求助,html中用ajaxfileupload上传一个文件没问题,那么多个文件时,filenam, filedata等参数改怎么写
前端代码
jQuery.ajaxFileUpload
(
{
url:'${base}/app/data/upload.do',
type:"post",
secureuri:true,
fileElementId:'fileid',
dataType: 'json',
data:{'filename':$("#filedata")[0].files[0].name,'parme':parme},
success: function (data, status)
{
if(data){
Dialog.alert("上传成功");
}
}
}
)
服务端代码
@At("/upload")
@Ok("raw")
@AdaptBy(type = UploadAdaptor.class, args={"${app.root}/WEB-INF/temp/gdyupload"})
public String uploadCMData(@Param("filedata") TempFile tmpfile,
@Param("filename") String filename,
@Param("parme") String parme,
HttpServletRequest request ) throws ParseException {
String result = "true";
if(tmpfile == null) return "文件为空";
携程TempFile[] 的话,fiename等参数怎么组织,我需要filename和file能对应上