类 MultipartConfigFactory

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

public class MultipartConfigFactory extends Object
Factory that can be used to create a MultipartConfigElement.
从以下版本开始:
1.4.0
作者:
Phillip Webb
  • 构造器详细资料

    • MultipartConfigFactory

      public MultipartConfigFactory()
  • 方法详细资料

    • setLocation

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

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

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

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

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