简体   繁体   English

在IE 10版本以下,HTML5拖放上传无法正常工作

[英]HTML5 Drag and Drop upload is not working on below the version IE 10

I am using the HTML5 DND file uploading http://html5demos.com/dnd-upload but it is not working in the below the version IE 10 我正在使用HTML5 DND文件上传http://html5demos.com/dnd-upload,但在以下版本的IE 10中无法正常工作

Webpage error details in IE browsers IE浏览器中的网页错误详细信息

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; BTRS124829; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C)
Timestamp: Wed, 2 Jan 2013 06:17:02 UTC


Message: Object doesn't support this property or method
Line: 57
Char: 1
Code: 0
URI: http://html5demos.com/dnd-upload

Per the previous answers, its not just about FileReader . 根据前面的答案,它不仅与FileReader有关。
Drag and Drop cannot be used perfectly in versions less than IE10. 在低于IE10的版本中,拖放操作无法完美使用。 Even IE9 has some problems, let be IE8. 甚至IE9都有一些问题,让我们成为IE8。

The browser should also support the DnD API 浏览器还应该支持DnD API

Check this link to another answer - Internet Explorer 9 Drag and Drop (DnD) 检查此链接至另一个答案-Internet Explorer 9拖放(DnD)

Check my application that allows drag drop of image files from your OS in to the browser: 检查我的应用程序,该应用程序允许将图像文件从您的操作系统拖放到浏览器中:
HTML-5-DD - BackboneJS HTML-5-DD -BackboneJS

It has 2 parts: 它分为两个部分:
1. HTML5 Drag drop, that allows drag drop from OS to Browser 1. HTML5拖放,允许从操作系统到浏览器的拖放
2. FileReader API that helps reading the image files as DataURI and appending the images 2. FileReader API,有助于将图像文件读取为DataURI并附加图像

If your browser does not support Drag Drop, you won't be able to drag drop images in a way that can be understood by JavaScript . 如果您的浏览器不支持拖放,则无法以JavaScript可以理解的方式拖放图像。

Conclusion: FileReader is not the main feature that IE needs to suport for your scenario, its also and importantly the Drag Drop 结论: FileReader不是IE需要支持的主要功能,也是重要的拖放功能

This is because HTML5 uses File API & FileReader API which are not supported in IE whose versions are below 10. 这是因为HTML5使用的File API & FileReader API在版本低于10的IE中不受支持。

Check the compatibility list here 此处检查兼容性列表

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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