作者:手机用户2502859667 | 来源:互联网 | 2022-03-28 19:17
Js代码
$('#file_upload').uploadify({
buttonImage: '${ctx }/commons/uploaddify/img/browse-btn.png',
swf :'${ctx }/commons/uploaddify/uploadify.swf',
uploader :'../servlet/defaultDispatcher;jsessiOnid=${pageContext.session.id}?__action=xxx',
fileTypeExts: '*.jpg;*.png;*.gif;*.bmp',
fileTypeDesc: '图像文件',
formData: {
timestamp: new Date().getTime()
},
onSelect: function(file){
//重写校验
},
onUploadProgress: function(file,bytesUploaded,bytesTotal,totalBytesUploaded,totalBytesTotal){
$('#pregress').html('总共需要上传'+bytesTotal+'字节,'+'已上传'+totalBytesTotal+'字节');
},
onUploadSuccess: function(file){
//上传成功
}
});
参考网上解决方案,在uploader路径后面增加jsessionId就好。