Jump to content
Larry Ullman's Book Forums

Uploading Pictures- Organization


Recommended Posts

I am making a social network and one of the features is to allow for users to upload pictures. In code, I'm able to crop the picture (to be used as the "main image") and create a thumbnail of it. I then store each version of the file in two separate directories (one for the "main" image, one for the thumbnail). The files are uniquely names with the User ID, time, and a random string. The users will not see the URL.

 

But all of the files are going into one of these two directories: should I somehow be storing the images in multiple/different subdirectories (like Facebook does)... or is the method I'm doing now sufficient (and I can change it down the line if necessary)?

 

Thanks!

Link to comment
Share on other sites

Good question. I would come up with an organization scheme now that is viable for the long term and you're right that putting al of the images in two directories will eventually become a problem.

Link to comment
Share on other sites

 Share

×
×
  • Create New...