Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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



Report this thread to moderator Post Follow-up to this message
Old Post
Tom
12-21-04 08:57 PM


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



Report this thread to moderator Post Follow-up to this message
Old Post
Hilarion
12-21-04 08:57 PM


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... 
php 
>
> 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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Tom
12-21-04 08:57 PM


Re: upload multiple files at once
Hilarion wrote: 
>
>
> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
meltedown
12-22-04 01:57 PM


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 t
he $_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 the
m
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



Report this thread to moderator Post Follow-up to this message
Old Post
Hilarion
12-22-04 01:57 PM


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



Report this thread to moderator Post Follow-up to this message
Old Post
Big Frank
12-23-04 01:56 PM


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... 
php 
>
> 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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Tom
12-23-04 08:58 PM


Re: upload multiple files at once
"Big Frank" <francois@duffortENLEVE.org> wrote:


>
> Alternatively, why not provide a list of, say, 10 input fields allowing yo
u
> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Markus G. Klötzer
12-24-04 01:58 PM


Re: upload multiple files at once
Hilarion wrote: 
>
>
> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
meltedown
12-25-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:16 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.