Skip to content

Need a way to set filename for Content-Disposition when uploading file-data from memory #702

@DHager

Description

@DHager

I ran into an issue where a remote server would refuse data (inside a multipart) unless the Content-Disposition header contained a filename, but I couldn't find any way to set one.

To be specific, in a multipart-part the server required:

Content-Disposition: form-data; name="data_form_input_name"; filename="original_filename.dat"

But refused to accept:

Content-Disposition: form-data; name="data_form_input_name"

I looked at the documentation for encode_form/1 but I wasn't able to solve the issue with ExtraHeaders, because the goal is to modify the existing header, rather than adding new siblings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions