aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/upload.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/upload.ex')
-rw-r--r--lib/pleroma/upload.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex
index 43ebe98e3..fdda2634e 100644
--- a/lib/pleroma/upload.ex
+++ b/lib/pleroma/upload.ex
@@ -25,6 +25,8 @@ defmodule Pleroma.Upload do
|> Keyword.fetch!(:url)
|> Keyword.fetch!(:host)
- "https://#{host}/media/#{file}"
+ protocol = Application.get_env(:pleroma, Pleroma.Web.Endpoint) |> Keyword.fetch!(:protocol)
+
+ "#{protocol}://#{host}/media/#{file}"
end
end