php upload files separately

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
giliat
Forum Commoner
Posts: 28
Joined: Sun May 20, 2007 2:00 pm

php upload files separately

Post 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:
smudge
Forum Contributor
Posts: 151
Joined: Sun May 20, 2007 12:13 pm

Post by smudge »

try replacing the onsubmit event (javascript - client side) with a loop to make a new AJAX request for each file
giliat
Forum Commoner
Posts: 28
Joined: Sun May 20, 2007 2:00 pm

can you show me how to do this ???

Post by giliat »

can you show me how to do this ???
smudge
Forum Contributor
Posts: 151
Joined: Sun May 20, 2007 12:13 pm

Post 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.
Post Reply