类 MultipartConfigFactory
java.lang.Object
org.springframework.boot.web.servlet.MultipartConfigFactory
Factory that can be used to create a
MultipartConfigElement.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Create a newMultipartConfigElementinstance.voidsetFileSizeThreshold(DataSize fileSizeThreshold) Sets thesizethreshold after which files will be written to disk.voidsetLocation(String location) Sets the directory location where files will be stored.voidsetMaxFileSize(DataSize maxFileSize) Sets the maximumsizeallowed for uploaded files.voidsetMaxRequestSize(DataSize maxRequestSize) Sets the maximumDataSizeallowed for multipart/form-data requests.
-
构造器详细资料
-
MultipartConfigFactory
public MultipartConfigFactory()
-
-
方法详细资料
-
setLocation
Sets the directory location where files will be stored.- 参数:
location- the location
-
setMaxFileSize
Sets the maximumsizeallowed for uploaded files.- 参数:
maxFileSize- the maximum file size
-
setMaxRequestSize
Sets the maximumDataSizeallowed for multipart/form-data requests.- 参数:
maxRequestSize- the maximum request size
-
setFileSizeThreshold
Sets thesizethreshold after which files will be written to disk.- 参数:
fileSizeThreshold- the file size threshold
-
createMultipartConfig
Create a newMultipartConfigElementinstance.- 返回:
- the multipart config element
-