public class MultipartConfigFactory extends Object
MultipartConfigElement
. Size values can be
set using traditional long values which are set in bytes or using more
readable String variants that accept KB or MB suffixes, for example:
factory.setMaxFileSize("10Mb"); factory.setMaxRequestSize("100Kb");
Constructor and Description |
---|
MultipartConfigFactory() |
Modifier and Type | Method and Description |
---|---|
MultipartConfigElement |
createMultipartConfig()
Create a new
MultipartConfigElement instance. |
void |
setFileSizeThreshold(int fileSizeThreshold)
Sets the size threshold in bytes after which files will be written to disk.
|
void |
setFileSizeThreshold(String fileSizeThreshold)
Sets the size threshold after which files will be written to disk.
|
void |
setLocation(String location)
Sets the directory location where files will be stored.
|
void |
setMaxFileSize(long maxFileSize)
Sets the maximum size in bytes allowed for uploaded files.
|
void |
setMaxFileSize(String maxFileSize)
Sets the maximum size allowed for uploaded files.
|
void |
setMaxRequestSize(long maxRequestSize)
Sets the maximum size allowed in bytes for multipart/form-data requests.
|
void |
setMaxRequestSize(String maxRequestSize)
Sets the maximum size allowed for multipart/form-data requests.
|
public void setLocation(String location)
location
- the locationpublic void setMaxFileSize(long maxFileSize)
maxFileSize
- the maximum file sizesetMaxFileSize(String)
public void setMaxFileSize(String maxFileSize)
maxFileSize
- the maximum file sizesetMaxFileSize(long)
public void setMaxRequestSize(long maxRequestSize)
maxRequestSize
- the maximum request sizesetMaxRequestSize(String)
public void setMaxRequestSize(String maxRequestSize)
maxRequestSize
- the maximum request sizesetMaxRequestSize(long)
public void setFileSizeThreshold(int fileSizeThreshold)
fileSizeThreshold
- the file size thresholdsetFileSizeThreshold(String)
public void setFileSizeThreshold(String fileSizeThreshold)
fileSizeThreshold
- the file size thresholdsetFileSizeThreshold(int)
public MultipartConfigElement createMultipartConfig()
MultipartConfigElement
instance.Copyright © 2016 Pivotal Software, Inc.. All rights reserved.