Fix failure to serve media from custom upload path

This commit is contained in:
RX14 2018-04-05 11:46:33 +01:00
parent d70d1c427a
commit 033771d9f1
No known key found for this signature in database
GPG Key ID: CEF2BBFE18BD0E67
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ defmodule Pleroma.Upload do
} }
end end
defp upload_path do def upload_path do
settings = Application.get_env(:pleroma, Pleroma.Upload) settings = Application.get_env(:pleroma, Pleroma.Upload)
Keyword.fetch!(settings, :uploads) Keyword.fetch!(settings, :uploads)
end end

View File

@ -11,7 +11,7 @@ defmodule Pleroma.Web.Endpoint do
# #
# You should set gzip to true if you are running phoenix.digest # You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production. # when deploying your static files in production.
plug(Plug.Static, at: "/media", from: "uploads", gzip: false) plug(Plug.Static, at: "/media", from: Pleroma.Upload.upload_path(), gzip: false)
plug( plug(
Plug.Static, Plug.Static,