Stryves Posted September 17, 2008 Share Posted September 17, 2008 Heyyas, This is more theory than assistance on code. I have a site where users can upload images, and the filename is randomly generated based on their ID/Datetime to prevent filename duplicates. I've noticed that using 1 directory for this is getting insanely full, over 4,000 images now. I was thinking of using a variable in the path so that after a certain date, all images would go into "/908" which is September 08. Because the path to the folder is included in the DB, it doesn't have any issue's on tracking, but I was curious if this at all matters? Anyone have suggestions of how they handle folders with images over 5,000 ? Or just don't look at that folder? Link to comment https://forums.phpfreaks.com/topic/124679-handling-of-uploaded-files/ Share on other sites More sharing options...
F1Fan Posted September 17, 2008 Share Posted September 17, 2008 I would suggest storing all the images in a directory with that month, like your "/0908/" directory that you mentioned. Then your code could just use the date to determine which folder it's in. Then you never loose track of where something is, and your folders will never get too big. Link to comment https://forums.phpfreaks.com/topic/124679-handling-of-uploaded-files/#findComment-643958 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.