I am thinking of developing an online gallery and will allow multiple users to create profiles and access their images via a login.
I was wondering if there is a way to give each image a unique name or ID for storage on the server so that I can just use one directory - instead of creating a new directory for each user and each user album. i.e. if 'User A' uploads and image named kitty.jpg and then 'User B' uploads a completely different image but also named kitty.jpg, the two image can reside in the same directory.
When looking at this, I thought that I may use say, an imageID PrimaryKey from the image_table in my database to rename the image for storage and use the original name as an alias - then display the alias on screen whenever referencing that image file.
Am I looking at this in the right way? Any advice would be great.
Many thanks