Class MultipartProperties
java.lang.Object
org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
@ConfigurationProperties(prefix="spring.servlet.multipart",
                         ignoreUnknownFields=false)
public class MultipartProperties
extends Object
Properties to be used in configuring a 
MultipartConfigElement.
 - locationspecifies the directory where uploaded files will be stored. When not specified, a temporary directory will be used.
- max-file-sizespecifies the maximum size permitted for uploaded files. The default is 1MB
- max-request-sizespecifies the maximum size allowed for multipart/form-data requests. The default is 10MB.
- file-size-thresholdspecifies the size threshold after which files will be written to disk. The default is 0.
 These properties are ultimately passed to MultipartConfigFactory which means
 you may specify numeric values using long values or using more readable
 DataSize variants.
- Since:
- 2.0.0
- Author:
- Josh Long, Toshiaki Maki, Stephane Nicoll, Yanming Zhou
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCreate a newMultipartConfigElementusing the properties.booleanbooleanbooleanvoidsetEnabled(boolean enabled) voidsetFileSizeThreshold(DataSize fileSizeThreshold) voidsetLocation(String location) voidsetMaxFileSize(DataSize maxFileSize) voidsetMaxRequestSize(DataSize maxRequestSize) voidsetResolveLazily(boolean resolveLazily) voidsetStrictServletCompliance(boolean strictServletCompliance) 
- 
Constructor Details- 
MultipartPropertiespublic MultipartProperties()
 
- 
- 
Method Details- 
isEnabledpublic boolean isEnabled()
- 
setEnabledpublic void setEnabled(boolean enabled) 
- 
getLocation
- 
setLocation
- 
getMaxFileSize
- 
setMaxFileSize
- 
getMaxRequestSize
- 
setMaxRequestSize
- 
getFileSizeThreshold
- 
setFileSizeThreshold
- 
isResolveLazilypublic boolean isResolveLazily()
- 
setResolveLazilypublic void setResolveLazily(boolean resolveLazily) 
- 
isStrictServletCompliancepublic boolean isStrictServletCompliance()
- 
setStrictServletCompliancepublic void setStrictServletCompliance(boolean strictServletCompliance) 
- 
createMultipartConfigCreate a newMultipartConfigElementusing the properties.- Returns:
- a new MultipartConfigElementconfigured using there properties
 
 
-