Annotation Type FileItemUpload


  • @Retention(RUNTIME)
    @Target({FIELD,METHOD})
    public @interface FileItemUpload
    Configure the way files can be uploaded in a FileItem property.

    Applies to properties of org.apache.commons.fileupload.FileItem type.
    Example:

    Since:
    6.6
    Author:
    Javier Paniza
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String acceptFileTypes
      Comma separated list of accepted mime types.
      long maxFileSizeInKb
      Maximum size of the file to upload in Kb.
    • Element Detail

      • acceptFileTypes

        java.lang.String acceptFileTypes
        Comma separated list of accepted mime types.

        If the uploaded file does not match with specified types the file is rejected.
        For example, with this code:

        Default:
        ""
      • maxFileSizeInKb

        long maxFileSizeInKb
        Maximum size of the file to upload in Kb.

        If the uploaded file is greater than the specified size the file is rejected.
        For example, with this code:

        Default:
        -1L