Commit 477c42f6 authored by 18083's avatar 18083

附件上传小于10k报错问题

parent 62b05e10
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
var year=data[0].year; var year=data[0].year;
var month=data[0].month; var month=data[0].month;
var factory = new Packages.org.apache.commons.fileupload.disk.DiskFileItemFactory(); var factory = new Packages.org.apache.commons.fileupload.disk.DiskFileItemFactory();
factory.setSizeThreshold(10);
var up = new Packages.org.apache.commons.fileupload.servlet.ServletFileUpload(factory); var up = new Packages.org.apache.commons.fileupload.servlet.ServletFileUpload(factory);
var items = up.parseRequest(request); var items = up.parseRequest(request);
var i = items.iterator(); var i = items.iterator();
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
if(output!=null){ if(output!=null){
output.close(); output.close();
} }
raise_app_error('上传文件出错,请联系管理员!'); raise_app_error('上传文件出错,请联系管理员!'+String(e.javaException.getMessage()));
println('上传文件出错,请联系管理员!e'); println('上传文件出错,请联系管理员!e');
} }
var file_length=get_file_length(file_path+file_name); var file_length=get_file_length(file_path+file_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment