* Creates a {@link FileUpload}.
*
* @return a {@link FileUpload}
*/
protected FileUpload createFileUpload() {
FileUpload upload = new FileUpload();
upload.setHeaderEncoding(request.getCharacterEncoding());
String sizeMax = System.getProperty(SIZE_MAX_KEY);
if (!StringUtil.isEmpty(sizeMax)) {
upload.setSizeMax(Long.valueOf(sizeMax));
}
String fileSizeMax = System.getProperty(FILE_SIZE_MAX_KEY);
if (!StringUtil.isEmpty(fileSizeMax)) {
upload.setFileSizeMax(Long.valueOf(fileSizeMax));
}
return upload;
}