DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setSizeThreshold(4096);
ServletFileUpload upload1 = new ServletFileUpload(factory);
upload1.setFileSizeMax(5242880);
List items = upload1.parseRequest(request);
Iterator it = items.iterator();
while(it.hasNext()){
FileItem item = (FileItem) it.next();
if(item.isFormField()){
filesname = ParamUtil.changeIsoToUtf8(filesname);
massAppFiles.setVersionid(filesname);
}
}
}else{
if(item.getFieldName().equals("picpath")){
upload = item.getName();
if (upload.length()>0) {
fileName = upload.substring(upload.lastIndexOf("\\")+1,upload.length());
temfile = new File(tarpath+filenametemp+"/zip/"+fileName);
item.write(temfile);
}
}