Class MultipartProperties


  • @ConfigurationProperties(prefix="spring.http.multipart",
                             ignoreUnknownFields=false)
    public class MultipartProperties
    extends Object
    Properties to be used in configuring a MultipartConfigElement.
    • location specifies the directory where uploaded files will be stored. When not specified, a temporary directory will be used.
    • max-file-size specifies the maximum size permitted for uploaded files. The default is 1MB.
    • max-request-size specifies the maximum size allowed for multipart/form-data requests. The default is 10MB.
    • file-size-threshold specifies the size threshold after which files will be written to disk. The default is 0.

    These properties are ultimately passed to MultipartConfigFactory which means you may specify numeric values using long values or using more readable String variants that accept KB or MB suffixes.

    Since:
    1.1.0