[#2497] Media preview proxy: added Content-Disposition header with filename to response.
authorIvan Tashkinov <ivantashkinov@gmail.com>
Thu, 20 Aug 2020 06:58:50 +0000 (09:58 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Thu, 20 Aug 2020 06:58:50 +0000 (09:58 +0300)
lib/pleroma/web/media_proxy/media_proxy_controller.ex

index 31d18c119e987d7079625f5a8af68ccfec2d74d6..5513432f0bad9b6da3351523bd93cc9a91fb541d 100644 (file)
@@ -87,6 +87,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyController do
            ) do
       conn
       |> put_resp_header("content-type", "image/jpeg")
+      |> put_resp_header("content-disposition", "inline; filename=\"preview.jpg\"")
       |> send_resp(200, thumbnail_binary)
     else
       _ ->