参考imageUpload,使用uploadifive上传文件,@Param("Filedata") TempFile tf,。tf一直为null
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
@POST
@At
@Ok("json")
public Object uploadPlaceFile(@Param("Filedata") TempFile tf, HttpServletRequest req, AdaptorErrorContext err,
@Param("layerCode") String layerCode, @Param("oid") int oid, @Param("fileType")int fileType,@Param("the_files")String fileName){
return Result.success("地名文件列表获取成功");
}
function initFileUpload(){
$('#placeFileUpload').uploadifive({
'auto': false,
'multi': false,
'width': '98%',
'height': '30',
'buttonText': '请选择文件',
'fileType': '*',
'fileSizeLimit': 209715.2,
'queueSizeLimit': 1,
'fileObjName': 'the_files',
'queueID': 'queuePlaceFile',
'removeCompleted':true,
'uploadScript': base+'/platform/stargis/place/uploadPlaceFile',
'onUploadComplete': function (file, data) {
getTablePlaceFileByHttp();
},
'onDrop': function (file, fileDropCount) {
clearFile();
},
'onClearQueue': function (queue) {
clearFile();
},
'onCancel': function () {
clearFile();
}
});
}
$('#placeFileUpload').data('uploadifive').settings.formData = { "layerCode":layerCode,"oid":oid,"fileType":placeFileType};
$('#placeFileUpload').uploadifive('upload');
[DEBUG] 2017-07-18 14:38:50,810 org.nutz.mvc.upload.UploadAdaptor.getReferObject(UploadAdaptor.java:184) - Select Html4 Form upload parser --> /platform/stargis/place/uploadPlaceFile
[DEBUG] 2017-07-18 14:38:50,817 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:39) - FastUpload : /platform/stargis/place/uploadPlaceFile
[DEBUG] 2017-07-18 14:38:50,821 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:54) - info created
[DEBUG] 2017-07-18 14:38:50,821 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:60) - Params map created - 0 params
[DEBUG] 2017-07-18 14:38:50,823 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:77) - boundary:
-----------------------------12045300425902
[DEBUG] 2017-07-18 14:38:50,831 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:100) - skip first boundary
[DEBUG] 2017-07-18 14:38:50,831 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:111) - Reading...
[DEBUG] 2017-07-18 14:38:50,834 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[20170209161331.png],fieldName=[the_files]
[DEBUG] 2017-07-18 14:38:50,835 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:137) - Upload Info: name=20170209161331.png,content_type=image/png
[DEBUG] 2017-07-18 14:38:50,884 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[layerCode]
[DEBUG] 2017-07-18 14:38:50,884 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[layerCode] value=[2001]
[DEBUG] 2017-07-18 14:38:50,884 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[oid]
[DEBUG] 2017-07-18 14:38:50,884 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[oid] value=[8156]
[DEBUG] 2017-07-18 14:38:50,885 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:133) - Upload File info: FilePath=[null],fieldName=[fileType]
[DEBUG] 2017-07-18 14:38:50,885 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:214) - Found a param, name=[fileType] value=[10]
[DEBUG] 2017-07-18 14:38:50,885 org.nutz.mvc.upload.FastUploading.parse(FastUploading.java:231) - ...Done 3175606 bytes readed
[DEBUG] 2017-07-18 14:39:10,128 cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [POST]URI=/platform/stargis/place/uploadPlaceFile 19342ms
[WARN ] 2017-07-18 14:39:10,128 org.quartz.impl.jdbcjobstore.Job