Merge branch 'bugfix/content-disposition' into 'develop'
UploadedMedia: Add missing disposition_type to Content-Disposition Closes #3114 See merge request pleroma/pleroma!3873
This commit is contained in:
commit
ddf57596be
3 changed files with 5 additions and 4 deletions
|
|
@ -35,9 +35,9 @@ defmodule Pleroma.Web.Plugs.UploadedMedia do
|
|||
conn =
|
||||
case fetch_query_params(conn) do
|
||||
%{query_params: %{"name" => name}} = conn ->
|
||||
name = String.replace(name, "\"", "\\\"")
|
||||
name = String.replace(name, ~s["], ~s[\\"])
|
||||
|
||||
put_resp_header(conn, "content-disposition", "filename=\"#{name}\"")
|
||||
put_resp_header(conn, "content-disposition", ~s[inline; filename="#{name}"])
|
||||
|
||||
conn ->
|
||||
conn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue