Class MultipartConfigFactory
java.lang.Object
org.springframework.boot.servlet.MultipartConfigFactory
Factory that can be used to create a
MultipartConfigElement.- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a newMultipartConfigElementinstance.voidsetFileSizeThreshold(@Nullable DataSize fileSizeThreshold) Sets thesizethreshold after which files will be written to disk.voidsetLocation(@Nullable String location) Sets the directory location where files will be stored.voidsetMaxFileSize(@Nullable DataSize maxFileSize) Sets the maximumsizeallowed for uploaded files.voidsetMaxRequestSize(@Nullable DataSize maxRequestSize) Sets the maximumDataSizeallowed for multipart/form-data requests.
-
Constructor Details
-
MultipartConfigFactory
public MultipartConfigFactory()
-
-
Method Details
-
setLocation
Sets the directory location where files will be stored.- Parameters:
location- the location
-
setMaxFileSize
-
setMaxRequestSize
-
setFileSizeThreshold
-
createMultipartConfig
Create a newMultipartConfigElementinstance.- Returns:
- the multipart config element
-