Extjs上传文件返回json的问题
2011-10-12 11:53
513 查看
uploadForm 上传返回json时报错,extjs不识别返回的json字符串,google以后,找到一个讨论帖:
http://www.sencha.com/forum/showthread.php?120201-Submitting-a-form-seems-to-be-mis-interpreting-the-response-type&
"try not setting the response to application/json. All "AJAX" file uploads must use iframes, thus a traditional form submit is required. The exception to this rule is use of the XHR2 object, which most browsers don't implement."
大意是iframe的提交方式与extjs默认的ajax方式不同,所以不要指定返回类型为 application/json,在django端把返回类型改成text/html就可以了
http://www.sencha.com/forum/showthread.php?120201-Submitting-a-form-seems-to-be-mis-interpreting-the-response-type&
"try not setting the response to application/json. All "AJAX" file uploads must use iframes, thus a traditional form submit is required. The exception to this rule is use of the XHR2 object, which most browsers don't implement."
大意是iframe的提交方式与extjs默认的ajax方式不同,所以不要指定返回类型为 application/json,在django端把返回类型改成text/html就可以了
相关文章推荐
- extjs3.4+struts2上传文件却弹出下载框,下载的文件内容为json 返回的值的问题
- 关于ext与springMVC中上传文件并以JSON格式返回入STORE的问题
- 解决ext+struts文件上传,json返回结果无法读取到的问题
- form+iframe上传文件返回json在IE下提示下载的问题(源于ueditor的错误)(从ITEYE搬家过来的)
- ext上传文件,服务端返回json时发现的一个问题
- ajaxfileupload上传文件,返回json数据报错的问题。 Resource interpreted as Document but transferred with MIME type ap
- 上传文件返回的json数据会被提示下载问题解决方案
- 关于jquery ajax 上传文件返回json内容包含html标签不识别问题
- jquery的ajaxForm在IE上传文件后返回json显示"文件下载"问题
- Extjs 使用fileText 文件上次后 无法解析后台返回的json问题
- 上传文件返回的json数据会被提示下载问题解决方案
- 如何解决“文件上传返回JSON数据,在IE下提示下载文件”的问题?
- spring mvc ajaxfileupload文件上传返回json下载问题
- 解决IE浏览器下上传文件返回Json数据提示下载的问题。
- 如何解决“文件上传返回JSON数据,在IE下提示下载文件”的问题?
- extjs 上传文件或是图片后返回json解析错误
- 处理文件上传后返回json数据在IE出现文件下载问题
- ajaxfileUpload.js 上传文件 IE浏览器提示下载json的问题
- 使用ajaxFileUpload与SpringMVC实现异步上传下载文件并返回json数据
- 实习第一天——做一个录音上传服务器的小功能pttp协议post发送文件和参数到服务器,解析返回的json数据