Skip to content

The key for and array is "files[]" in place of "files" #146

@sebderiv

Description

@sebderiv

I wonder why, when we upload multiple files, the request is like

files[]:[{....},{...}]

and not simply
files:[{....},{...}]

When I upload only one file everything works well but with multiple files I have troubles for selecting them in my back-end with multer or multiparty due to that special key. I can't select a key that contain special characters like [].

I tried to edit paramNamespace or paramName but that doesn't fix the problem.

With multer I have this error:
{"code":"LIMIT_UNEXPECTED_FILE","field":"files[]","storageErrors":[]}

When I reopen Uploader object and edit createFormData method to remove the [] in the key everything works well.

Am I the only one that encounter this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions