Created
February 23, 2018 04:51
-
-
Save tomwilsn/13a7d94d9e0d46208bd34393485346d3 to your computer and use it in GitHub Desktop.
Multiple file uploads with HTTPoison
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:multipart, [ | |
{:file, path, {"form-data", [{"name", "form_field_name"}, {"filename", Path.basename(path)}]}, | |
[{"Content-Type", MIME.from_path(path)} | |
], | |
[ | |
{:file, path, {"form-data", [{"name", "another_name"}, {"filename", Path.basename(another_path)}]}, | |
[{"Content-Type", MIME.from_path(another_path)} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment