public class MultiPartConfigFactory extends Object
MultipartConfigElement
. Size values can be
set using traditional long values 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 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 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 for multipart/form-data requests.
|
void |
setMaxRequestSize(String maxRequestSize)
Sets the maximum size allowed for multipart/form-data requests.
|
public void setLocation(String location)
public void setMaxFileSize(long maxFileSize)
setMaxFileSize(String)
public void setMaxFileSize(String maxFileSize)
setMaxFileSize(long)
public void setMaxRequestSize(long maxRequestSize)
setMaxRequestSize(String)
public void setMaxRequestSize(String maxRequestSize)
setMaxRequestSize(long)
public void setFileSizeThreshold(int fileSizeThreshold)
setFileSizeThreshold(String)
public void setFileSizeThreshold(String fileSizeThreshold)
setFileSizeThreshold(int)
public MultipartConfigElement createMultipartConfig()
MultipartConfigElement
instance.Copyright © 2014. All rights reserved.