Click to See Complete Forum and Search --> : Upload several files


xavikevicious
November 10th, 2004, 06:47 AM
Hi everyone,

i'd want to know how i upload several files with php from my pccomputer to server. These files are .txt files and i want to upload them without the HTML tag <Input type=FILE>. Is it possible??

thanks in advance

Xavik

Mutilated1
November 11th, 2004, 02:39 PM
Well the <input type='file' /> way would be the easiest way, why don't you want to do it like that ?

xavikevicious
November 12th, 2004, 06:11 AM
hi,

well, i can't to do this because i would want upload several files in a sequence. i am using one dialog (i select one directory with 50,60,100 or more files) .Do you understand me??

thanks

Xavik

Mutilated1
November 12th, 2004, 08:45 AM
Oh, so you want to use the Windows common dialog and select a whole group of files at once right ? Not use the dialog and select and file, then use the dialog and select a file, and use the dialog and select a file, over and over again ? right ?

Sorry, I really don't think you can do that with PHP allthough I imagine its not outside of the realm of possibility to use a Javascript to invoke the Common Open file dialog and then pop the file names into the <input type='file' />s on your webpage.

Have you ever seen a page that works the way you want ? If so, post a link here and we can figure out how its done, cause I'd like to do that too if its possible.

xavikevicious
November 23rd, 2004, 09:42 AM
hi mutilated!!

i think that i will use winrar,winzip.. and i will compress my directory and then i will upload this to my server and finally i will decompress there. i think that is the best solution.

One thing, do you know if it's possible to run winrar.exe with javascript??(i know that i need the activexobject Shell.Application but with winXP SP2 this possibility is null for security reasons). Do you know one alternative for this??

Finally, i don't know any link for upload several files for these purpose (related with your post), im sorry

thanks for all and i 'm going to wait your response briefly

xavik

Viper_SB
November 23rd, 2004, 11:58 AM
According to the HTML specifications you CAN upload more then one file at once, but the only browser that implements it (as far as I know) is opera, they should allow multiple fileuploads (not sure if there is a max). And yes I'm pretty sure PHP could then handle it.

(I know you aren't going this way, but thought it might intrest you)

visualAd
November 25th, 2004, 07:07 AM
You can upload multiple files in PHP, but as you may imagain, you need to use multiple file inputs. For an unspecified number of files you can generate the file upload fields using Javascript, as long as they all have the same name, you can then access them as an array in PHP.

xavikevicious
November 28th, 2004, 06:15 PM
Thanks at all. I have find one sollution: i have compress all files and then i have upload it to server. thanks again