与IE9 Blueimp文件上传 [英] Blueimp file uploader with IE9

查看:176
本文介绍了与IE9 Blueimp文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将文件上载到在AngularJS应用程序中使用这个插件一个REST API。
当秒fileuploaddone事件触发后,我收到从Internet Explorer说黄色通知:你想保存\\打开

截图附后。


解决方案

  根据

的Iframe上传需要一个内容类型的文本/ plain或text / HTML的JSON响应 - 他们如果IFRAME响应设置为应用程序/ JSON表明不希望下载对话框


来源:的https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation

您需要设置正确的Content-Type在上面的链接解释说。

I am uploading a file to a REST API using this plugin in an AngularJS application. When seconds after the 'fileuploaddone' event fires, I get a yellow notification from Internet Explorer saying: Would you like to save \ open the

Screenshot attached.

解决方案

Iframe based uploads require a Content-type of text/plain or text/html for the JSON response - they will show an undesired download dialog if the iframe response is set to application/json.

Source: https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation

You will need to set the right Content-Type as explained in the link above.

这篇关于与IE9 Blueimp文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆