简体   繁体   English

medium-editor-insert-plugin:在IE9中无法上传图片

[英]medium-editor-insert-plugin: image upload not working in IE9

Using the latest version of https://github.com/orthes/medium-editor-insert-plugin , and image uploading is not working for me in IE9. 使用最新版本的https://github.com/orthes/medium-editor-insert-plugin ,并且图像上传在IE9中对我不起作用。

I filed a bug report on GitHub about this: 我在GitHub上提交了关于此的错误报告:

https://github.com/orthes/medium-editor-insert-plugin/issues/149 https://github.com/orthes/medium-editor-insert-plugin/issues/149

Re-posting here to see if anyone in a wider audience has a solution to this. 重新张贴在这里,看看是否有更广泛的听众对此有解决方案。

For debugging purposes, I've set up a test site at: 为了调试,我在以下位置设置了一个测试站点:

http://mediumeditortest.vector5.com.au/ http://mediumeditortest.vector5.com.au/

You can select an image to upload inline, and it will get sent to the server; 您可以选择要内联上传的图像,该图像将被发送到服务器。 but it doesn't get saved, the server returns back a sample image (partridge.jpg) on success. 但是它没有保存,服务器成功返回一个示例图像(partridge.jpg)。

Works fine for me on latest Chrome / Firefox / Safari, but not on IE9 - after selecting an image to upload, it just shows an empty newline in the editor content. 在最新的Chrome / Firefox / Safari上对我来说效果很好,但在IE9上却不行-选择要上传的图像后,它在编辑器内容中仅显示一个空换行符。

From IE debugbar / dev-tools network panes, and also from my server logs, I see that no POST request (or other request) is being made. 从IE debugbar / dev-tools网络窗格以及服务器日志中,我看到没有发出POST请求(或其他请求)。

I've verified that Images.prototype.uploadAdd in medium-editor-insert-plugin is getting called (and data.submit in jquery-fileupload is getting called too); 我已经验证了Images.prototype.uploadAdd了medium-editor-insert-plugin中的data.submit (并且也data.submit了jquery-fileupload中的data.submit ); but Images.prototype.uploadDone never fires (not surprising, since there's no AJAX request happening). 但是Images.prototype.uploadDone永远不会触发(不足为奇,因为没有AJAX请求发生)。

Any ideas? 有任何想法吗? Anything obvious that I've missed? 有什么明显的我想念的吗? Any more fixes that need to be made to medium-editor-insert-plugin, jquery-fileupload, or another related library? 还需要对medium-editor-insert-plugin,jquery-fileupload或其他相关库进行修复吗? Running out of ideas here! 这里的想法用光了!

I'm not fully familiar with the medium-editor-insert-plugin , so I'm not sure if this is related to your issue or not. 我对medium-editor-insert-plugin并不十分熟悉,所以我不确定这是否与您的问题有关。 I'll attempt to get more familiar with the code and see if I can understand the root cause. 我将尝试使代码更加熟悉,看看是否可以理解根本原因。

Based on my experience with working with drag and drop images for the root medium-editor code I found that IE9 does not support the File API: 根据我对根中型编辑器代码使用拖放图像的经验,我发现IE9不支持File API:

http://caniuse.com/#feat=fileapi http://caniuse.com/#feat=fileapi

What this means for medium-editor is that when drop fires after dragging a file into the page, the native event.dataTransfer.files is undefined. 对于中型编辑器来说,这意味着将文件拖到页面中后,如果放空触发,则本机event.dataTransfer.files是未定义的。 For all other browsers supported by medium-editor, this mechanism can be used to grab the dragged file to embed it into the page. 对于中型编辑器支持的所有其他浏览器,此机制可用于获取被拖动的文件以将其嵌入到页面中。 Thus, we don't support dragging images into medium-editor for IE9, and we don't currently have a workaround. 因此,我们不支持将图像拖到IE9的中型编辑器中,并且目前还没有解决方法。

@Jaza Please try after installing or enable(if already installed) adobe flash player. @Jaza请在安装或启用(如果已安装)adobe Flash Player之后尝试。

I was facing the same issue but after installing adobe flash player I am easily able to upload images and videos on IE9. 我遇到了同样的问题,但是在安装Adobe Flash Player之后,我可以轻松地在IE9上上传图像和视频。

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

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