So I want to be able to have my users upload entire folders of images to the server.....
I know I cant create an upload form and have them just select an entire folder, but I have a few ideas about how to accomplish this task and I want some input..
Ideas:
1.) Have the user zip the folder, have them upload it through the form, and then have PHP unzip the folder and put it where it needs to go
2.) I'm not sure if this will work at all.... Can I use java script to somehow scan the folder than the user has selected on their computer, have it load all of the file names into an array, then have PHP create a new folder on my server and upload the one by one all the the files in the array on its own?
Idea 1 seems easy as I already have the zip library running in another part of my code, but requires more work on part of the user, which I want to avoid. Anyone have input of other ideas that are easy to implement?
PHP upload entire folder of files?
Moderator: General Moderators
Re: PHP upload entire folder of files?
just bumping this up to page 1 again....
Re: PHP upload entire folder of files?
1 is the way, at it is easily implementable with PCLZip... I even have such working code, that works with a directory tree in the ZIP file (not single folder)
You cannot scan files with JavaScript and you cannot upload multiple files at once with HTML page (unless you do not use multiple inputs, but the user will have to select a file for each one). However with Flash, user can select multiple files at once (and as far as I know, that the way GMail does it under Windows)
You cannot scan files with JavaScript and you cannot upload multiple files at once with HTML page (unless you do not use multiple inputs, but the user will have to select a file for each one). However with Flash, user can select multiple files at once (and as far as I know, that the way GMail does it under Windows)