List of usage examples for org.apache.wicket.util.lang Bytes MAX
Bytes MAX
To view the source code for org.apache.wicket.util.lang Bytes MAX.
Click Source Link
From source file:org.hippoecm.frontend.plugins.yui.upload.validation.DefaultUploadValidationService.java
License:Apache License
/** * Check if the defaultMaximumUploadSize stored in the IApplicationSettings is set explicitly and only * then used it, otherwise use DEFAULT_MAX_FILE_SIZE. This is because it is set to Bytes.MAX * by default which is a bit overkill (8388608T). * * @return The String value of the default maximum file size for an upload */// w w w .j a v a 2 s .c om protected String getDefaultMaxFileSize() { IApplicationSettings settings = Application.get().getApplicationSettings(); Bytes defaultSize = settings.getDefaultMaximumUploadSize(); return Bytes.MAX.equals(defaultSize) ? DEFAULT_MAX_FILE_SIZE : defaultSize.toString(); }
From source file:org.xaloon.wicket.component.uploadify.UploadifyFileProcessPage.java
License:Apache License
public UploadifyFileProcessPage(PageParameters params) { HttpServletRequest r = ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest(); try {/* w ww . ja va 2s .c o m*/ MultipartServletWebRequest r2 = new MultipartServletWebRequest(r, Bytes.MAX); for (FileItem fi : r2.getFiles().values()) { processFileItem(fi); fi.delete(); } } catch (Exception e) { e.printStackTrace(); } }