Multipart Form Data Filter. New version of legacy MultipartFilter
Can be used if for any reason we need to actually have a MultipartFilter still
This class decodes the multipart/form-data stream sent by a HTML form that uses a file input
item. Any files sent are stored to a temporary file and a File object added to the request
as an attribute. All other values are made available via the normal getParameter API and
the setCharacterEncoding mechanism is respected when converting bytes to Strings.
This filter can be configured with the following parameters:
Legacy parameters
- MAX_UPLOAD_DISK_SIZE
- Max allowed upload size in bytes (defaults to "10 MB").
- MAX_UPLOAD_RAM_SIZE
- Max upload size cached in memory (defaults to "100 KB").
- TEMP_UPLOAD_DIR_PATH
- Path to temporary directory in which to store uploads
that are too large to keep in memory (defaults to "temp").
Standard parameters
- deleteFiles
- "true" then any files created will be deleted when the current request returns.
- maxFormKeys
- maximum number of keys that may be present in a form (default set by
system property org.eclipse.jetty.server.Request.maxFormKeys or 1000) to protect against DOS attacks by bad hash keys.
- maxFileSize
- max file size that can be uploaded. Same as MAX_UPLOAD_DISK_SIZE
- maxRequestSize
- limit the size of the multipart request.
Note: This is very similar to com.webmethods.caf.faces.servlet.MultiPartFilter of 8.1.11
Jetty Request.getParts requires the inputStream as we cannot grab it twice.