diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex index 8a9dc612a..e5df94009 100644 --- a/lib/pleroma/upload.ex +++ b/lib/pleroma/upload.ex @@ -58,7 +58,7 @@ defmodule Pleroma.Upload do } end - defp upload_path do + def upload_path do settings = Application.get_env(:pleroma, Pleroma.Upload) Keyword.fetch!(settings, :uploads) end diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index dde4e3ffe..dfafc95f4 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -11,7 +11,7 @@ defmodule Pleroma.Web.Endpoint do # # You should set gzip to true if you are running phoenix.digest # 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.Static,