6

I want to implement a multi file upload I was thinking if its possible to have a browse button open a file dialog which may allow me to select more than one file and once i select them these files can upload. I am doing this on a website and using php jQuery etc.

By looking at the answers i feel that multi-select is not possible. So i am updating my question to this : Can i select a zip file and get a set of file objects inside zip file and then work on individual file objects.

3 Answers 3

7

In some of the more up-to-date browsers that support HTML5 (i.e. Firefox, Chrome, Safari), the multiple attribute will work:

<label>Select files: <input name="files" type="file" multiple></label>
Sign up to request clarification or add additional context in comments.

3 Comments

Don't suggest something we can not use today :) We are far away from HTML5, see this: stackoverflow.com/questions/2261138/… and caniuse.com
That very much depends on both target audience and application. And it is good to know that this will be in HTML5.
However, this is a way to use HTML 5 in IE 6, 7 and 8. davidwalsh.name/chrome-frame
1

Gmail allows selecting multiple files as attachments by using a Flash control just for the upload.

2 Comments

I looked at Gmail and i must say WOW i was looking for that!! but i dont know how to implement it.
Yeah, it's a really nice implementation; very subtle. So that's why I thought I'd mention it as an option. I haven't tried this myself, but swfupload.org might get you started. I'm sure the SO community could help if you try an implementation and get stuck.
1

Nope, that's not possible, you can specify one file at a time for a single file type. On the other hand, you might want to have a look at:

6 Comments

can you tell me why? what prevents a multiselect?
@sushil bharwani: This is W3C specification, browsers won't allow you to select more than one file for a single input file. More info: w3.org/TR/html401/interact/forms.htm
@sarfraz sorry if i am asking too much!! can we do it by some custom dll or something.Like a program that runs just for me.
@sushil bharwani: Nope, not possible, browser won't do that still :( If you want to use flash, see the answer of @KatieK though.
I can use flash. But the answer does not suggest a direction as how to implement
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.