Skip to content

Override content disposition with provided filename#137

Open
bolek wants to merge 1 commit intoelixir-waffle:masterfrom
tolemi-inc:override-filename
Open

Override content disposition with provided filename#137
bolek wants to merge 1 commit intoelixir-waffle:masterfrom
tolemi-inc:override-filename

Conversation

@bolek
Copy link

@bolek bolek commented Mar 27, 2025

When provided to store/1
%{filename: "some file.png", remote_path: "https://example.com/file"}
and the remote_path returns a content disposition header,
we get a unhandled CaseClause exception

example:

elixir

** (CaseClauseError) no case clause matching: {:ok, "/var/folders/mw/xdbkgz2n1fdgd75384n7mrr40000gn/T/WM2DEEDR55E4VNIPURIBLPMKV4DBLKFD.png", "image three.png"}

This PR fixes the above, by adding a case clause. It will use the provided filename rather than the filename
returned in the content disposition header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant