简体   繁体   中英

How can I upload more than one file from a single HTML form in IE?

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?

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.

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.

还有一个很棒的资源“ HTML形式文件输入(或“上传”) ”,它讨论了与文件上传有关的跨浏览器问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM