javax.servlet.annotation
注释类型 MultipartConfig


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface MultipartConfig

Annotation that may be specified on a Servlet class, indicating that instances of the Servlet expect requests that conform to the multipart/form-data MIME type.

Servlets annotated with MultipartConfig may retrieve the Part components of a given multipart/form-data request by calling getPart or getParts.


可选元素摘要
 int fileSizeThreshold
          The size threshold after which the file will be written to disk
 String location
          The directory location where files will be stored
 long maxFileSize
          The maximum size allowed for uploaded files.
 long maxRequestSize
          The maximum size allowed for multipart/form-data requests The default is -1L, which means unlimited.
 

location

public abstract String location
The directory location where files will be stored

默认值:
""

maxFileSize

public abstract long maxFileSize
The maximum size allowed for uploaded files.

The default is -1L, which means unlimited.

默认值:
-1L

maxRequestSize

public abstract long maxRequestSize
The maximum size allowed for multipart/form-data requests

The default is -1L, which means unlimited.

默认值:
-1L

fileSizeThreshold

public abstract int fileSizeThreshold
The size threshold after which the file will be written to disk

默认值:
0


Copyright © 2013. All Rights Reserved.