org.springframework.boot.web.servlet

Class MultipartConfigFactory

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


  • public class MultipartConfigFactory
    extends java.lang.Object
    Factory that can be used to create a MultipartConfigElement.
    Since:
    1.4.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      javax.servlet.MultipartConfigElement createMultipartConfig()
      Create a new MultipartConfigElement instance.
      void setFileSizeThreshold(org.springframework.util.unit.DataSize fileSizeThreshold)
      Sets the size threshold after which files will be written to disk.
      void setLocation(java.lang.String location)
      Sets the directory location where files will be stored.
      void setMaxFileSize(org.springframework.util.unit.DataSize maxFileSize)
      Sets the maximum size allowed for uploaded files.
      void setMaxRequestSize(org.springframework.util.unit.DataSize maxRequestSize)
      Sets the maximum DataSize allowed for multipart/form-data requests.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultipartConfigFactory

        public MultipartConfigFactory()
    • Method Detail

      • setLocation

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

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

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

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

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