更新时间:2023-12-04 20:27:10
根据的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.