I have a form where a user could upload a picture, then another one, then another one, a single picture at a time.
However, one of my clients is going to be uploading up to 100 pictures at a time.
Even with a form for selecting 100 pictures, this would be tedious.
So I'm going to attempt to make a script to upload a whole folder at a time.
My logic:
1.) File upload form where the browse button selects folders, not files
2.) Pick out all files ending in .JPG
3.) Loop through and upload
Sounds good.
However, is there an HTML form that selects directories (I've never ran across one while coding)?
Picking out only .JPG files, should be easy.
Looping through them, brings me to a question.. I can't use readdir() can I? It seems that readdir is for an already existing directory on the server. How would I go about looping through the files?
Is this beyond the scopes of PHP?
uploading a whole folder
Moderator: General Moderators
can't be done, php is server, files are on the client.
I posted about 6 months ago almost this very question, using HTML and http as the protocol, you're stuck doing only one at a time unless you write some kind of java applet, or flash, or activeX control they can install on their machine that would give you access to their file system. Can you have them just ftp the files/folder to the server, then do your scripting on the folder once it's there?
I posted about 6 months ago almost this very question, using HTML and http as the protocol, you're stuck doing only one at a time unless you write some kind of java applet, or flash, or activeX control they can install on their machine that would give you access to their file system. Can you have them just ftp the files/folder to the server, then do your scripting on the folder once it's there?
neg, it's done by topic, and I already put it in your topic.
/me thinks this may have been a bad idea.
unfrozen caveman lawer might return sooner than later...
edit:
/me thinks this may have been a bad idea.
unfrozen caveman lawer might return sooner than later...
edit:
not sure, but we've most definitely violated it if there is...back to "real" discussions....Edit: Is there a rule for off-topic-ness?