views:

469

answers:

3

Internet Explorer (from versions 4 to 7, at least) limits the number of files uploaded using a single 'input type="file"' form field to one. What is the best approach to take if I want to upload more than one file in a single HTTP POST request?

+5  A: 

You have to include multiple input controls, one per file to be uploaded.

If you don't know how many you want ahead of time, you can use jQuery (or plain javascript) to create them on-the-fly.

Adam Bellaire
A: 

There is also a great resource 'File input (or "upload") in HTML forms' which discusses cross-browser issues with file upload.

Matthew Murdoch
+1  A: 

There's also the SWFUpload library. It allows to select multiple files in the file selection dialog. However, it requires both flash and javascript to be enabled.

Rimas Kudelis