Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Possible to POST an array of files? #32

Closed
lauritzsh opened this issue Mar 4, 2016 · 2 comments
Closed

Possible to POST an array of files? #32

lauritzsh opened this issue Mar 4, 2016 · 2 comments

Comments

@lauritzsh
Copy link

Hi, I am wondering if it is possible to POST an array of files in a single request? The server expects a field called files[] or just files that is supposed to be an array of files. Is it possible to do this in any way? I can only figure out how to post a single file.

I tried let files: AnyObject = [/* my HTTPFiles */] but that does not work, because array literal can't be used for AnyObject.

The files I am trying to upload is using multipart/form-data.

Thank you.

@FlorianWendelborn
Copy link

You might be able to use base64 encoding for this, otherwise you probably have to use a custom protocol, which I'd avoid.

Not sure if HTTP2 would be able to do this though.

@penacristian
Copy link

Any update on this issue?

@dduan dduan closed this as completed Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants