Annotation Interface MultipartConfig


@Target(TYPE) @Retention(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.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The size threshold after which the file will be written to disk
    The directory location where files will be stored
    long
    The maximum size allowed for uploaded files.
    long
    The maximum size allowed for multipart/form-data requests
  • Element Details

    • location

      String location
      The directory location where files will be stored
      Default:
      ""
    • maxFileSize

      long maxFileSize
      The maximum size allowed for uploaded files.

      The default is -1L, which means unlimited.

      Default:
      -1L
    • maxRequestSize

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

      The default is -1L, which means unlimited.

      Default:
      -1L
    • fileSizeThreshold

      int fileSizeThreshold
      The size threshold after which the file will be written to disk
      Default:
      0