HTML5 input type file's multiple attribute not

2019-01-14 19:09发布

I want to create a multi file uploder using HTML5 and PHP5. I don't want to use any flash player for support. Flash uploader will not support in iphone. I created the form like this

<form name="uploader" method="post" action="" enctype="multipart/form-data">

    <input type="file" name="images[]" id="images" multiple="multiple" />

    <input type="submit" name="button" value="Submit" /> 

</form>

It is working with chrome, mozilla, opera, safari... but IE not supporting this.

I tried with IE8 and IE9 both are not supporting. How can I fix this? Anybody who knows the solution please kindly help me.

4条回答
The star\"
2楼-- · 2019-01-14 19:31

A few things:

  1. IE doesn't support multiple file upload
  2. Flash is currently the way to get round that, or just to drop to single uploads in IE
  3. The iPad doesn't support Flash, but also doesn't support file uploads
  4. The usage of IE is much higher than iOS

So, the logical conclusion is either:

  • Use multiple uploads in new browsers, and single in older ones – IE users won't notice, as they have never been able to upload multiple files anyway!

  • Use Flash as a fallback in older browsers

(Update: iOS6 now does allow file upload, including multiple uploads)

查看更多
forever°为你锁心
4楼-- · 2019-01-14 19:41

IE9 does not support multiple file uploads or the File API, according to this source. Here is another thread on SO asking the same question with the same answer. Like Craig says, your best bet for now is to use Flash as a replacement in IE and older browsers; such a solution is employed by Dojo 1.6.

查看更多
迷人小祖宗
5楼-- · 2019-01-14 19:44

IE8 does not support HTML5. Perhaps IE9 is running in compatibility mode? Press F12 to bring up the developer tools and in the top menu you can change the settings in what mode it is in.

Maybe it is a solution to use a Java or Flash based system for multiple uploads. Also, these will also usually support drag and drop of files.

查看更多
登录 后发表回答