Ajax.Updater 上传附件报错:the request was rejected because no multipart boundary was found

lioushuei 2009-03-13 11:18:04
我的附件也就十几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 而已
等啊 、。。、、、

...全文
1148 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lioushuei 2009-03-13
  • 打赏
  • 举报
回复
时间参数去了没用 试了
mumu_java 2009-03-13
  • 打赏
  • 举报
回复
把那个时间参数去掉或者换成固定数字试试.

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧