Page 1 of 1

php upload files separately

Posted: Sun May 20, 2007 2:10 pm
by giliat
Hello
I create a form with upload fields
(After submit the form create a DIR in the server with a name from one filed and all in going to that dir).
The form also uploading images to my site
The php.ini is up to 3Mb and I can't modified it (Window server)
So I limit each field to 2Mb
But I need to upload them one after another and to that DIR

Can someone help me with this?

Thank
Gil
:oops:

Posted: Mon May 21, 2007 9:07 pm
by smudge
try replacing the onsubmit event (javascript - client side) with a loop to make a new AJAX request for each file

can you show me how to do this ???

Posted: Tue May 22, 2007 2:44 am
by giliat
can you show me how to do this ???

Posted: Tue May 22, 2007 3:25 pm
by smudge
personally, i don't know how exactly to do it, but i know it can be done, because i have seen it, but the code for it is very specific as to what browser the client side is using. If i knew how, i would be glad to tell you, but i don't, so i can't. :( There are two things i would look into though, 1) do a google search for "ajax file uploads", and 2) find a way for javascript to read files. AJAX is definitely the way to go, since it can upload the files one by one and independently of the server. Hope you figure it out.