Class CommonsMultipartFormDataParserFactory
java.lang.Object
com.aspectran.web.support.multipart.commons.CommonsMultipartFormDataParserFactory
- Direct Known Subclasses:
CommonsMultipartFormDataParserFactoryBean
The Class CommonsMultipartFormDataParserFactory.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new Commons multipart request wrapper parser. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new MultipartFormDataParser object.Gets the allowed file extensions.Gets the denied file extensions.long
Gets the maximum size of the request.Gets the temporary file path.void
setAllowedFileExtensions
(String allowedFileExtensions) Sets the allowed file extensions.void
setDeniedFileExtensions
(String deniedFileExtensions) Sets the denied file extensions.void
setMaxFileSize
(long maxFileSize) Sets the maximum size of the file.void
setMaxFileSize
(String maxFileSize) Sets the maximum size of the file in human-readable format.void
setMaxInMemorySize
(int maxInMemorySize) Set the maximum allowed size (in bytes) before uploads are written to disk.void
setMaxInMemorySize
(String maxInMemorySize) Set the maximum allowed size (in bytes) before uploads are written to disk.void
setMaxRequestSize
(long maxRequestSize) Sets the maximum size of the request.void
setMaxRequestSize
(String maxRequestSize) Sets the maximum size of the request in human-readable format.void
setTempDirectoryPath
(String tempDirectoryPath) Sets the temporary directory path.
-
Constructor Details
-
CommonsMultipartFormDataParserFactory
public CommonsMultipartFormDataParserFactory()Instantiates a new Commons multipart request wrapper parser.
-
-
Method Details
-
getTempDirectoryPath
Gets the temporary file path.- Returns:
- the temporary file path
-
setTempDirectoryPath
Sets the temporary directory path.- Parameters:
tempDirectoryPath
- the temporary directory path
-
getMaxRequestSize
public long getMaxRequestSize()Gets the maximum size of the request.- Returns:
- the maximum size of the request
-
setMaxRequestSize
public void setMaxRequestSize(long maxRequestSize) Sets the maximum size of the request.- Parameters:
maxRequestSize
- the maximum size of the request
-
setMaxRequestSize
Sets the maximum size of the request in human-readable format.- Parameters:
maxRequestSize
- the maximum size of the request in human-readable format.- See Also:
-
FileUploadBase.setSizeMax(long)
-
setMaxFileSize
public void setMaxFileSize(long maxFileSize) Sets the maximum size of the file.- Parameters:
maxFileSize
- the maximum size of the file- See Also:
-
FileUploadBase.setFileSizeMax(long)
-
setMaxFileSize
Sets the maximum size of the file in human-readable format.- Parameters:
maxFileSize
- the maximum size of the file in human-readable format- See Also:
-
FileUploadBase.setFileSizeMax(long)
-
setMaxInMemorySize
public void setMaxInMemorySize(int maxInMemorySize) Set the maximum allowed size (in bytes) before uploads are written to disk. Uploaded files will still be received past this amount, but they will not be stored in memory. Default is 10240, according to Commons FileUpload.- Parameters:
maxInMemorySize
- the maximum in memory size allowed- See Also:
-
DiskFileItemFactory.setSizeThreshold(int)
-
setMaxInMemorySize
Set the maximum allowed size (in bytes) before uploads are written to disk. Uploaded files will still be received past this amount, but they will not be stored in memory. Default is 10240, according to Commons FileUpload.- Parameters:
maxInMemorySize
- the maximum in memory size allowed (human-readable format)- See Also:
-
DiskFileItemFactory.setSizeThreshold(int)
-
getAllowedFileExtensions
Gets the allowed file extensions.- Returns:
- the allowed file extensions
-
setAllowedFileExtensions
Sets the allowed file extensions.- Parameters:
allowedFileExtensions
- the allowed file extensions
-
getDeniedFileExtensions
Gets the denied file extensions.- Returns:
- the denied file extensions
-
setDeniedFileExtensions
Sets the denied file extensions.- Parameters:
deniedFileExtensions
- the denied file extensions
-
createMultipartFormDataParser
Creates a new MultipartFormDataParser object.- Returns:
- the multipart form data parser
-