2.8.4 @MultipartConfig

Organization of this subsection
(1) Description
(2) Attributes

(1) Description

This annotation performs settings for the Servlet that deals with multipart/form-data requests.

The following table lists the @MultipartConfig attributes:

Attribute nameFunctionality
fileSizeThresholdThis attribute sets the threshold size of the uploaded file written on the disk.
locationThis attribute specifies the directory that stores the uploaded file.
maxFileSizeThis attribute specifies the maximum size of the uploaded file.
maxRequestSizeThis attribute specifies the maximum size of multipart/form-data requests.

Details of each attributes are as follows:

(2) Attributes

(a) fileSizeThreshold attributes
Type
int
Description
This attribute specifies the threshold size of the uploaded file written on disk.
Default value
0
(b) location attribute
Type
String
Description
This attribute specifies the directory that stores the uploaded file.
Default value
""
(c) maxFileSize attribute
Type
long
Description
This attribute specifies the maximum size of the uploaded file.
Default value
-1L (limitless)
(d) maxRequestSize attribute
Type
long
Description
This attribute specifies the maximum size of multipart/form-data requests.
Default value
-1L (limitless)