How can I let the user select more than one file to upload?

Gmail has just released an update for its interface, allowing the user to select more than one file to download using the CTRL button. How do they do it? You can read about the new feature and see a screenshot here:

http://gmailblog.blogspot.com/2009/02/updates-to-attachments-multi-select-and.html

+4
source share
5 answers

You will need to find a flash based solution like Google with Gmail. You can try this jQuery plugin that offers exactly that: jQuery File Upload Plugin

+7
source

Adobe Flash Player

Here is a good library that I used: SWFUpload

Of course, this is a JavaScript library, not a jQuery plugin, which makes it much more portable.

+3
source

Take a look at RFC 1867. It defines how to upload files via HTTP using multi-page / mixed encoding. You can use the Apache Commons FileUpload library to do this in Java. I don’t know how Google does it, but you can manage multiple selections with JavaScript processing on your page.

0
source

Not the method that Gmail uses, but the following link in combination with some jquery allows you to download an unlimited number of files at the same time: Link

-1
source

Google doesn't use Flash, but actually some kind of clever javascript (well, this is what they all think about :-)). Using javascript and css, you can create a file selector that allows the user to select the file to upload. Then you use a hidden iframe. The act of submitting a form with your upload file is aimed at a hidden iframe so that the result obtained from the successful success of the server falls into this hidden iframe. Using javascript, control the document body of this iframe to know when the file is uploaded.

This link is a quick example of a basic concept: http://www.seemysites.net/projFolder/uploader/

-1
source

All Articles