Open DHager opened 2 years ago
My current workaround is to save the data to a temporary file on disk (with a specific name), use {file, Path, Name, ExtraHeaders}
, and then delete the temporary file afterwards... But it's annoying.
we can have a pattern that just place needed headers instead. I will think about it
Hi, any updates on this?
One option may be to add a new item to the list, {file_in_memory, Name, FileName, Data, ExtraHeaders}
.
This is in contrast to {file, Path, Name, ExtraHeaders}
, where the Path
is indirectly supplying both FileName
and Data
through a disk-access.
Ping.
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:
But refused to accept:
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.