aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRX14 <chris@rx14.co.uk>2018-04-05 11:46:33 +0100
committerRX14 <chris@rx14.co.uk>2018-04-05 11:46:33 +0100
commit033771d9f186012a066d8b42152a18076651171f (patch)
tree086ae0eb1732ec22cc1e7cd9dbd6bd015c59b833
parentd70d1c427a29411f2b47789f91894cd08f91ba6e (diff)
downloadpleroma-033771d9f186012a066d8b42152a18076651171f.tar.gz
Fix failure to serve media from custom upload path
-rw-r--r--lib/pleroma/upload.ex2
-rw-r--r--lib/pleroma/web/endpoint.ex2
2 files changed, 2 insertions, 2 deletions
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,