public interface MultipartResolver
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupMultipart(MultipartRequest request)
Cleanup any resources used for the multipart handling, like a storage for the uploaded files.
|
boolean |
isMultipart(HttpRequest request)
Determine if the given request contains multipart content, will typically check for content type
"multipart/form-data".
|
MultipartRequest |
resolveMultipart(HttpRequest request)
Parse the given request into multipart files and parameters, and wrap the request inside a
MultipartRequest object that provides access to file descriptors and makes contained parameters accessible via
the standard HttpRequest methods. |
void |
setAllFileMaxSize(long allFileMaxSize)
Set the maximum size (in bytes) allowed for uploading.
|
void |
setFileMaxSize(long fileMaxSize)
Set the maximum size (in bytes) allowed for each individual file.
|
void |
setMaxInMemorySize(int maxInMemorySize)
Set the maximum allowed size (in bytes) before uploads are written to disk, default is 10240.
|
void |
setUploadTempDir(java.io.File uploadTempDir)
Set the temporary directory where uploaded files get stored.
|
void setAllFileMaxSize(long allFileMaxSize)
allFileMaxSize - the maximum upload size allowed.FileUpload#setSizeMax(long)void setFileMaxSize(long fileMaxSize)
fileMaxSize - the maximum upload size per file.FileUpload#setFileSizeMax(long)void setMaxInMemorySize(int maxInMemorySize)
maxInMemorySize - the maximum in memory size allowed.DiskFileItemFactory#setSizeThreshold(int)void setUploadTempDir(java.io.File uploadTempDir)
boolean isMultipart(HttpRequest request)
request - the request to be evaluated.MultipartRequest resolveMultipart(HttpRequest request) throws MultipartException
MultipartRequest object that provides access to file descriptors and makes contained parameters accessible via
the standard HttpRequest methods.request - the request to wrap (must be of a multipart content type).MultipartException - if the request is not multipart, or encounter other problems.void cleanupMultipart(MultipartRequest request)
request - the request to cleanup resources for.