nutzwk,前端html表单包含图片上传,提交到后台的HttpServletRequest的parameterMap值为0,我不选择图片上传直接提交后就没问题,求指教
<label for="imageName" class="col-sm-2 control-label">图片路径:</label>
<div class="col-sm-3">
<div id="queue"></div>
<div>
<input id="file_upload" name="file_upload" type="file" multiple="false">
</div>
<input type="hidden" id="imageName" name="imageName" value="" >
</div>
$('#file_upload').uploadifive({
'auto': true,
'multi': false,
'width': '100%',
'height': '35',
'buttonText': '请选择图片',
'fileType': 'image/jpg,image/jpeg,image/png',
'fileSizeLimit': 1024,
'queueSizeLimit': 1,
'formData': {},
'queueID': 'queue',
'uploadScript': '${base}/open/file/upload/image',
'onUploadComplete': function (file, data) {
data = JSON.parse(data);
if (data.code == 0) {
Toast.success(data.msg);
$("#imageName").val('http://${AppDomain}${base}'+data.data);
} else {
clearFile();
Toast.error(data.msg);
}
},
'onDrop': function (file, fileDropCount) {
clearFile();
},
'onClearQueue': function (queue) {
clearFile();
},
'onCancel': function () {
clearFile();
}
});