Right, this is what I am trying to do,
A user will visit my website to upload media content, IE, images for an image gallery or videos. I will store this media onto my website and then return an access code to the user so they can access the media through the access code.
This is my question,
I am looking into structuring the folders as efficiently as possible to store the uploaded content, there are two types of media they can upload, Video and Image, so I have the two parent folders,
- Video
- Image
what I am concerned about, is that is it a good idea to place all the video/image content within one folder, or should I have sub folders ?
Also, a user will typically upload more than one image, say 5-10, and when requested to view these images they will be returned in an image gallery format, so I was thinking to have a sub folder with the image Gallery’s ID storing all the images for that image gallery, is this efficient?
Are there any folder structures to follow for storing uploaded data?
I came across this structure in a place I worked. And I’ve been using it wherever possible ever since.
(Assuming the folders aren’t visible to your users) Give each user (gallery) a guid. Then create a directory path using the first 3 characters of the guid like so:
This limits the total number of folders in each parent to 16 and ensures you never have many folders in the ‘destination’ folder and also allows quick retrieval of the path when the guid is known.