JonathanAnon Posted May 20, 2009 Share Posted May 20, 2009 Working on a housing database, eight text fields (i.e. easy) and 6 images required for each record. I've read through a lot of posts here before and the general opinion is to upload the file to a folder and then include a text field in the database to give the path to the file (as opposed to using a BLOB and uploading the image directly to the database). I have my code prepared to do this BUT - what way should I handle the folders, should I create a folder for each record, should I just have all the images in one folder... what's the best practice on this? Quote Link to comment https://forums.phpfreaks.com/topic/158898-saving-multiple-files-to-database/ Share on other sites More sharing options...
fenway Posted May 20, 2009 Share Posted May 20, 2009 Just create a single folder per "filetype", then santize the file and include the UID in the filename. Quote Link to comment https://forums.phpfreaks.com/topic/158898-saving-multiple-files-to-database/#findComment-838199 Share on other sites More sharing options...
JonathanAnon Posted May 20, 2009 Author Share Posted May 20, 2009 Yeah that sounds like the best, didnt think about that. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/158898-saving-multiple-files-to-database/#findComment-838248 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.