throw new Exception("No file upload details configured for upload id " + uploadId + ".");
}
int sessionTimeoutBlockId = LogonControllerFactory.getInstance().addSessionTimeoutBlock(request.getSession(),
"Upload request.");
try {
UploadHandler handler = UploadHandlerFactory.getInstance().getUploader(upload.getType());
if (handler == null) {
throw new Exception("No handler for upload type " + upload.getType());
}
request.setAttribute(Constants.REQ_ATTR_UPLOAD_DETAILS, new Integer(uploadId));
boolean isFileExist = handler.checkFileToUpload(request, response, upload, uploadForm.getUploadFile());
if (isFileExist) {
request.getSession().setAttribute("uploadForm", uploadForm);
return new ActionForward("/confirmFileUpload.do?arg0=" + uploadForm.getUploadFile().getFileName());
} else {
return confirmUpload(mapping, form, request, response);