File uploads

File uploads are handled transparently by the library. The only things you must specify are:

If you want to have indexed list of uploaded files with possible gaps (no file is uploaded for some indexes), you can define property of type List<UploadedFileWrapper> and define nested list mapping for it. Let's assume the property for nested list mapping has name myAttachment, field names myAttachment[0]-file, myAttachment[1]-file, ... are then available in corresponding FormFields of your filled form. UploadedFileWrapper contains property "file" of type UploadedFile. You should adhere to this convention if form field names are hardcoded in template.

File uploads are internally implemented using Apache Commons FileUpload library.

Parameters of file uploads can be configured via ServletRequestParams or PortletRequestParams class that is used to preprocess request parameters. Overloaded constructor of this class accepts the following parameterization: