commit: 45627dde17a4093775e770e83bffbfec4e1b6759
parent d70d1c427a29411f2b47789f91894cd08f91ba6e
Author: lambda <pleromagit@rogerbraun.net>
Date:   Thu,  5 Apr 2018 10:54:07 +0000
Merge branch 'develop' into 'develop'
Fix failure to serve media from custom upload path
See merge request pleroma/pleroma!95
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git 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
@@ -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,