Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Multiple values in same field #56

@luaVolk

Description

@luaVolk

I'm trying to send multiple files to the server but the server only gets one.

// Client
FormData formData = FormData();

for (var i = 0; i < files.length; i++) {
  formData.appendBlob('files', files[i]);
  formData.append('paths', filePaths[i]);
}

print(formData.getAll('paths')); // Has multiple values

HttpRequest.request('/files', method: "POST", sendData: formData).then((res) {
  ...
}).catchError((e) {
  ...
});
// Server

HttpBodyHandler.processRequest(req).then((post) {
  print(post.body); // Each field only has 1 value
});

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