mikebarbaro Posted July 5, 2011 Share Posted July 5, 2011 Hello, I have developed a gallery in PHP and MySQL that currently has an upload form with one file upload field. Once I select an image to upload the form then uploads the selected image and stores it's URL in the MySQL database as a random name. The problem is that I upload a new gallery weekly that contains more than 100 photos so this gets very time consuming to do each photo individually. I'd love some direction trying to build a gallery that does the following after selecting the folder to upload: 1. Gives a random name to each individual photo from the selected folder 2. Uploads them into a directory 3. Stores the individual paths to the MySQL database Any help or direction is highly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/ Share on other sites More sharing options...
AyKay47 Posted July 5, 2011 Share Posted July 5, 2011 since you have already done most of the work, I won't insult your inteligence by stating the obvious ways to do numbers 1 and 3 on your list. to upload the images to a certain directory, you will want to use the move_uploaded_file() function Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238730 Share on other sites More sharing options...
mikebarbaro Posted July 5, 2011 Author Share Posted July 5, 2011 well my problem is that i want to be able to just select the whole folder and have it automatically process each photo within the folder individually to perform those functions on each. Kind of like facebook does when you upload multiple files. Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238733 Share on other sites More sharing options...
AyKay47 Posted July 5, 2011 Share Posted July 5, 2011 The uploading of entire directories/folders is a limitation of the upload capabilities of the browser, not PHP Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238736 Share on other sites More sharing options...
jcbones Posted July 6, 2011 Share Posted July 6, 2011 Could you just zip it, then send it. Using the ZipArchive Class that comes with PHP 5.3 would make it easy to un-zip them into the correct directory. Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238808 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2011 Share Posted July 6, 2011 http://swfupload.org/ Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238812 Share on other sites More sharing options...
mikebarbaro Posted July 6, 2011 Author Share Posted July 6, 2011 got it. thank you all for your replies! Quote Link to comment https://forums.phpfreaks.com/topic/241161-uploading-an-image-folder-using-phpmysql/#findComment-1238869 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.