使用 IE9 的 Blueimp 文件上传器 [英] Blueimp file uploader with IE9

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

问题描述

我正在 AngularJS 应用程序中使用此插件将文件上传到 REST API.当fileuploaddone"事件触发几秒钟后,我收到来自 Internet Explorer 的黄色通知,内容为:您要保存\打开

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

附上截图.

推荐答案

基于 iframe 的上传要求 JSON 响应的内容类型为 text/plain 或 text/html - 如果 iframe 响应设置为 application/json,它们将显示不需要的下载对话框.

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.

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

您需要按照上面链接中的说明设置正确的 Content-Type.

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

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

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