Skip to content

Wrong error triggered when number of fields exceed maxCount with .array(fieldname[, maxCount]) #402

@adrienbarreau

Description

@adrienbarreau

I use upload.array('files', 5).

When I send from 1 to 5 files, everything works great !
But when I send 6 files I got the following error :
{ [Error: Unexpected field] code: 'LIMIT_UNEXPECTED_FILE', field: 'files', storageErrors: [] }

According to make-error.js I should get this code LIMIT_FILE_COUNT right ? Or am I missing something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions