Ajax.Updater 上传附件报错:the request was rejected because no multipart boundary was found
我的附件也就十几kb 而已
贴出我的部分代码:
js:
var a=new Ajax.Updater(
'divfile',
'checkshowTaxAction.do?method=showexcel&reqTime='+new Date().getTime(),
{
method:'post',
parameters:Form.serialize(objform),
contentType:'multipart/form-data'
}
);
document.getElementById("divfile").innerHTML="<img src="+filePath+"/images/loading.gif >请稍等...";
}
jsp:
<html:form action="jsp/checkshowTaxAction.do?method=insertsql" method="post" enctype="multipart/form-data" >
<input type="file" id="excelfile" name="excelfile" onchange="checkfile(this,this.form);" size="80" class="input"/>
actionform:
FormFile excelfile;
public FormFile getExcelfile() {
return excelfile;
}
public void setExcelfile(FormFile excelfile) {
this.excelfile = excelfile;
}
struts-config.xml 中form 和action 已经配置好 如果我把 用到上传附件的代码注释掉就可以提交到action
但是不注释掉的话提交action 都进不去 就报错:the request was rejected because no multipart boundary was found
why ?????????网上看了 说 附件大了 我的附件也就十几kb 而已
等啊 、。。、、、