• Public
  • Public/Protected
  • All

Interface MulterOptions






Optional dest

dest: string

Optional limits

limits: object

An object specifying the size limits of the following optional properties. This object is passed to busboy directly, and the details of properties can be found on https://github.com/mscdex/busboy#busboy-methods

Type declaration

  • Optional fieldNameSize?: number

    Max field name size (Default: 100 bytes)

  • Optional fieldSize?: number

    Max field value size (Default: 1MB)

  • Optional fields?: number

    Max number of non- file fields (Default: Infinity)

  • Optional fileSize?: number

    For multipart forms, the max file size (in bytes)(Default: Infinity)

  • Optional files?: number

    For multipart forms, the max number of file fields (Default: Infinity)

  • Optional headerPairs?: number

    For multipart forms, the max number of header key=> value pairs to parse Default: 2000(same as node's http).

  • Optional parts?: number

    For multipart forms, the max number of parts (fields + files)(Default: Infinity)

  • Optional preservePath?: boolean

    Keep the full path of files instead of just the base name (Default: false)

Optional storage

storage: any

The storage engine to use for uploaded files.


Optional fileFilter

  • fileFilter(req: any, file: object, callback: function): void
  • Parameters

    • req: any
    • file: object
      • buffer: Buffer

        A Buffer of the entire file (MemoryStorage)

      • destination: string

        The folder to which the file has been saved (DiskStorage)

      • encoding: string

        Encoding type of the file

      • fieldname: string

        Field name specified in the form

      • filename: string

        The name of the file within the destination (DiskStorage)

      • mimetype: string

        Mime type of the file

      • originalname: string

        Name of the file on the user's computer

      • path: string

        Location of the uploaded file (DiskStorage)

      • size: number

        Size of the file in bytes

    • callback: function
        • (error: Error | null, acceptFile: boolean): void
        • Parameters

          • error: Error | null
          • acceptFile: boolean

          Returns void

    Returns void

Generated using TypeDoc