if ((ywid == null) || "".equals(ywid)) {
response.sendRedirect(url);
System.out.println("未接收到ywid:::::::::::::文件上传部分");
} else{
Files files_temp = new Files();
SmartUpload mySmartUpload = new SmartUpload();
try {
// Initialization
mySmartUpload.initialize(config, request, response);
// Upload
mySmartUpload.upload();
Files files = mySmartUpload.getFiles();
//FileUtil fileutil = new FileUtil();
//fileutil.upload(request, files, ywid, sslx);
//System.out.println(files.getCount());
//
// 拼接files对象
Object obj = request.getSession().getAttribute("se_files"+ywid);
if (obj != null) {
files_temp = (Files) obj;
}
for (int i = 0; i < files.getCount(); i++) {
File myFile = files.getFile(i);
if (!myFile.isMissing()) {
files_temp.addFile(myFile);
}
}
request.getSession().setAttribute("se_files"+ywid, files_temp);