@ConfigurationProperties(prefix="spring.http.multipart", ignoreUnknownFields=false) public class MultipartProperties extends Object
MultipartConfigElement
.
location
specifies the directory where files will be stored.
The default is "". A common value is to use the system's temporary directory, which can
be obtained.max-file-size
specifies the maximum size permitted for
uploaded files. The default is 1Mb.max-request-size
specifies the maximum size allowed
for multipart/form-data requests. The default is 10Mbfile-size-threshold
specifies the size threshold
after which files will be written to disk. Default is 0, which means that the file will
be written to disk immediately.
These properties are ultimately passed through MultipartConfigFactory
which
means you may specify the values using long values or using more readable
String variants that accept KB or MB suffixes.
Constructor and Description |
---|
MultipartProperties() |
Modifier and Type | Method and Description |
---|---|
MultipartConfigElement |
createMultipartConfig()
Create a new
MultipartConfigElement using the properties. |
boolean |
getEnabled() |
String |
getFileSizeThreshold() |
String |
getLocation() |
String |
getMaxFileSize() |
String |
getMaxRequestSize() |
boolean |
isResolveLazily() |
void |
setEnabled(boolean enabled) |
void |
setFileSizeThreshold(String fileSizeThreshold) |
void |
setLocation(String location) |
void |
setMaxFileSize(String maxFileSize) |
void |
setMaxRequestSize(String maxRequestSize) |
void |
setResolveLazily(boolean resolveLazily) |
public boolean getEnabled()
public void setEnabled(boolean enabled)
public String getLocation()
public void setLocation(String location)
public String getMaxFileSize()
public void setMaxFileSize(String maxFileSize)
public String getMaxRequestSize()
public void setMaxRequestSize(String maxRequestSize)
public String getFileSizeThreshold()
public void setFileSizeThreshold(String fileSizeThreshold)
public boolean isResolveLazily()
public void setResolveLazily(boolean resolveLazily)
public MultipartConfigElement createMultipartConfig()
MultipartConfigElement
using the properties.MultipartConfigElement
configured using there propertiesCopyright © 2016 Pivotal Software, Inc.. All rights reserved.