Fix failure to serve media from custom upload path
authorRX14 <chris@rx14.co.uk>
Thu, 5 Apr 2018 10:46:33 +0000 (11:46 +0100)
committerRX14 <chris@rx14.co.uk>
Thu, 5 Apr 2018 10:46:33 +0000 (11:46 +0100)
lib/pleroma/upload.ex
lib/pleroma/web/endpoint.ex

index 8a9dc612a4c654f4803617ac4f44b216bd55f82c..e5df9400987adfc285302975d32cdc78e1829339 100644 (file)
@@ -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
index dde4e3ffec097f1abbc9348fdb7e74c302579f67..dfafc95f44c22cc4630b9847aefc3c8ea7fcdf5f 100644 (file)
@@ -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,