upload multiple files at once

This is a discussion on upload multiple files at once within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, Is it possible to upload a bunch of files at once to the server with a php script ? The ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-21-2004
Tom
 
Posts: n/a
Default upload multiple files at once

Hi,

Is it possible to upload a bunch of files at once to the server with a php
script ? The user should be able to select multiple files and not one by
one... All the scripts I found up till now can upload multiple files but
only by selecting them one by one in different boxes.

Thanks in advance,

Tom


Reply With Quote
  #2 (permalink)  
Old 12-21-2004
Hilarion
 
Posts: n/a
Default Re: upload multiple files at once

> Is it possible to upload a bunch of files at once to the server with a php
> script ? The user should be able to select multiple files and not one by
> one... All the scripts I found up till now can upload multiple files but
> only by selecting them one by one in different boxes.


It's not a PHP problem, but client-side HTML problem. HTML does not allow
multiple file upload (one <input type="file" ... /> is one uploaded file).
Some portals use ActiveX controls to solve those problems.

Hilarion


Reply With Quote
  #3 (permalink)  
Old 12-21-2004
Tom
 
Posts: n/a
Default Re: upload multiple files at once

Thanks for your reply.
What is the easiest way to solve this problem ? Write a java applet ?

Tom

"Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
news:cq9gjr$t42$1@news.onet.pl...
> > Is it possible to upload a bunch of files at once to the server with a

php
> > script ? The user should be able to select multiple files and not one by
> > one... All the scripts I found up till now can upload multiple files but
> > only by selecting them one by one in different boxes.

>
> It's not a PHP problem, but client-side HTML problem. HTML does not allow
> multiple file upload (one <input type="file" ... /> is one uploaded file).
> Some portals use ActiveX controls to solve those problems.
>
> Hilarion
>
>



Reply With Quote
  #4 (permalink)  
Old 12-22-2004
meltedown
 
Posts: n/a
Default Re: upload multiple files at once

Hilarion wrote:
>>Is it possible to upload a bunch of files at once to the server with a php
>>script ? The user should be able to select multiple files and not one by
>>one... All the scripts I found up till now can upload multiple files but
>>only by selecting them one by one in different boxes.

>
>
> It's not a PHP problem, but client-side HTML problem. HTML does not allow
> multiple file upload (one <input type="file" ... /> is one uploaded file).
> Some portals use ActiveX controls to solve those problems.
>
> Hilarion
>
>

That does not mean you can't make a php script with multiple file
uploads ,each chosen by the user

Here is the input tag:
<input type="file" name="images+3">

each tag has a different name, the names of the files which are chosen
end up in the $_FILES array.
Reply With Quote
  #5 (permalink)  
Old 12-22-2004
Hilarion
 
Posts: n/a
Default Re: upload multiple files at once

> That does not mean you can't make a php script with multiple file uploads ,each chosen by the user
>
> Here is the input tag:
> <input type="file" name="images+3">
>
> each tag has a different name, the names of the files which are chosen end up in the $_FILES array.


Look at the text:

"The user should be able to select multiple files and not one by one..."

Your solution allows uploading of multiple files, but user has to select them
one by one.
Yes, it allows uploading more than one file, but each one requires one
<input type="file" ... /> tag, so 4 files is 4 inputs etc.

Hilarion


Reply With Quote
  #6 (permalink)  
Old 12-23-2004
Big Frank
 
Posts: n/a
Default Re: upload multiple files at once


"Tom" <t_t_1232000nospam@yahoo.com> wrote in message
news:1103642965.511020@dmz2.imec.be...
> Hi,
>
> Is it possible to upload a bunch of files at once to the server with a php
> script ? The user should be able to select multiple files and not one by
> one... All the scripts I found up till now can upload multiple files but
> only by selecting them one by one in different boxes.


The way Gallery solved this is by allowing you to upload a zipfile of files
(ok, so you need to know in advance which files you want to upload and have
them ready zipped) and the php then unzips them for you.

Just a thought, although this might not be the best solution if you have the
type of user who thinks a cd drive is a cup holder!

Alternatively, why not provide a list of, say, 10 input fields allowing you
to select up to 10 files and then you have one 'UPLOAD!' button. Again, this
is how Gallery allows the user to do it.

http://gallery.menalto.com/ if you aren't aware of it

MERRY CHRISTMAS


Reply With Quote
  #7 (permalink)  
Old 12-24-2004
Markus G. Klötzer
 
Posts: n/a
Default Re: upload multiple files at once

"Big Frank" <francois@duffortENLEVE.org> wrote:


>
> Alternatively, why not provide a list of, say, 10 input fields allowing you
> to select up to 10 files and then you have one 'UPLOAD!' button.



And use "name[]" as the fieldname then those files come into an array
which makes it easier to process.

hth

mgk
--
Honk if you love peace and quiet.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0