Class MultipartConfigFactory

java.lang.Object
org.springframework.boot.web.servlet.MultipartConfigFactory

public class MultipartConfigFactory extends Object
Factory that can be used to create a MultipartConfigElement.
Since:
1.4.0
Author:
Phillip Webb
  • Constructor Details

    • MultipartConfigFactory

      public MultipartConfigFactory()
  • Method Details

    • setLocation

      public void setLocation(String location)
      Sets the directory location where files will be stored.
      Parameters:
      location - the location
    • setMaxFileSize

      public void setMaxFileSize(DataSize maxFileSize)
      Sets the maximum size allowed for uploaded files.
      Parameters:
      maxFileSize - the maximum file size
    • setMaxRequestSize

      public void setMaxRequestSize(DataSize maxRequestSize)
      Sets the maximum DataSize allowed for multipart/form-data requests.
      Parameters:
      maxRequestSize - the maximum request size
    • setFileSizeThreshold

      public void setFileSizeThreshold(DataSize fileSizeThreshold)
      Sets the size threshold after which files will be written to disk.
      Parameters:
      fileSizeThreshold - the file size threshold
    • createMultipartConfig

      public MultipartConfigElement createMultipartConfig()
      Create a new MultipartConfigElement instance.
      Returns:
      the multipart config element