Skip to content

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

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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