您的位置:首页 > Web前端 > JavaScript

使用ajaxfileupload.js上传无法进回调问题终极解决

2015-05-25 17:11 761 查看
第一种情况  Jquery问题:

Jquery1.4.2版本以后的  在ajaxfileupload.js里面加入以下代码

 

handleError: function( s, xhr, status, e ) 		{
// If a local callback was specified, fire it
if ( s.error ) {
s.error.call( s.context || s, xhr, status, e );
}

// Fire the global callback
if ( s.global ) {
(s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
}
}


不存在版本问你的接着往下看:

在struts.xml里配置的时候  result一定添加这句属性

 

<param name="contentType">text/html</param>

 

<action name = "Appversion-apkUpload" class="com.sinpertime.bm.action.AppVersionAction" method = "apkUpload">
<result name="bm_success" type="json">
<param name="root">dataMap</param>
<param name="noCache">true</param>
<param name="contentType">text/html</param>
</result>
<interceptor-ref name="fileUpload">
</interceptor-ref>
<!-- 默认拦截器必须放在fileUpload之后,否则无效 -->
<interceptor-ref name="defaultStack" />
</action>

 

整了一下午  希望能够帮助到遇到同样问题的你
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐