public class MultipartConfigFactory extends Object
MultipartConfigElement
. Size values can be
set using traditional long values which are set in bytes or using more
convenient DataSize
variants.Constructor and Description |
---|
MultipartConfigFactory() |
Modifier and Type | Method and Description |
---|---|
MultipartConfigElement |
createMultipartConfig()
Create a new
MultipartConfigElement instance. |
void |
setFileSizeThreshold(DataSize fileSizeThreshold)
Sets the
size threshold after which files will be written to disk. |
void |
setFileSizeThreshold(int fileSizeThreshold)
Deprecated.
since 2.1.0 in favor of
setFileSizeThreshold(DataSize) |
void |
setFileSizeThreshold(String fileSizeThreshold)
Deprecated.
since 2.1.0 in favor of
setFileSizeThreshold(DataSize) |
void |
setLocation(String location)
Sets the directory location where files will be stored.
|
void |
setMaxFileSize(DataSize maxFileSize)
Sets the maximum
size allowed for uploaded files. |
void |
setMaxFileSize(long maxFileSize)
Deprecated.
since 2.1.0 in favor of
setMaxFileSize(DataSize) |
void |
setMaxFileSize(String maxFileSize)
Deprecated.
since 2.1.0 in favor of
setMaxFileSize(DataSize) |
void |
setMaxRequestSize(DataSize maxRequestSize)
Sets the maximum
DataSize allowed for multipart/form-data requests. |
void |
setMaxRequestSize(long maxRequestSize)
Deprecated.
since 2.1.0 in favor of
setMaxRequestSize(DataSize) |
void |
setMaxRequestSize(String maxRequestSize)
Deprecated.
since 2.1.0 in favor of
setMaxRequestSize(DataSize) |
public void setLocation(String location)
location
- the locationpublic void setMaxFileSize(DataSize maxFileSize)
size
allowed for uploaded files.maxFileSize
- the maximum file size@Deprecated public void setMaxFileSize(long maxFileSize)
setMaxFileSize(DataSize)
maxFileSize
- the maximum file size@Deprecated public void setMaxFileSize(String maxFileSize)
setMaxFileSize(DataSize)
maxFileSize
- the maximum file sizepublic void setMaxRequestSize(DataSize maxRequestSize)
DataSize
allowed for multipart/form-data requests.maxRequestSize
- the maximum request size@Deprecated public void setMaxRequestSize(long maxRequestSize)
setMaxRequestSize(DataSize)
maxRequestSize
- the maximum request size@Deprecated public void setMaxRequestSize(String maxRequestSize)
setMaxRequestSize(DataSize)
maxRequestSize
- the maximum request sizepublic void setFileSizeThreshold(DataSize fileSizeThreshold)
size
threshold after which files will be written to disk.fileSizeThreshold
- the file size threshold@Deprecated public void setFileSizeThreshold(int fileSizeThreshold)
setFileSizeThreshold(DataSize)
fileSizeThreshold
- the file size threshold@Deprecated public void setFileSizeThreshold(String fileSizeThreshold)
setFileSizeThreshold(DataSize)
fileSizeThreshold
- the file size thresholdpublic MultipartConfigElement createMultipartConfig()
MultipartConfigElement
instance.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.