Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple file uploads with Firefox 3.6

34 views
Skip to first unread message

ScottChiefBaker

unread,
Jan 25, 2010, 2:47:07 PM1/25/10
to
After reading this I'd about multiple file uploads with FF3.6 I'd like
to experiment with it.

https://developer.mozilla.org/en/Using_files_from_web_applications

I have a small PHP image gallery that this would be perfect for. If I
add "multiple" to my input tags I can send multiple files, but what
ends up getting to PHP is just the last file. In the $_FILES[] array
is just the last selected file. I'm assuming this is for backwards
compatibility.

Is there a way to use this new tag to upload multiple files with PHP
in the standard input type="file" method, that PHP will recognize as
multiple files? All the examples are AJAX and that's not what I want.
Current I have three file elements on a page with name="uploaded_file
[]" and PHP sees each file separately. Can this functionality be
replicated with the multiple option?

Or does all file processing for multiple have to be done with JS prior
to actually uploading the file?

goat

unread,
Feb 13, 2010, 3:27:37 PM2/13/10
to

Had the same question. I believe the new functionality of the input
element ("multiple") is the same as the way "multiple" is handled on
SELECT tags; therefore, just add "[]" to the end of your input element
name to make it expect multiple values (like an array). Here is an
example: http://hacks.mozilla.org/2009/12/multiple-file-input-in-firefox-3-6/

0 new messages