From: RX14 Date: Thu, 5 Apr 2018 10:46:33 +0000 (+0100) Subject: Fix failure to serve media from custom upload path X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=033771d9f186012a066d8b42152a18076651171f;p=akkoma Fix failure to serve media from custom upload path --- 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,