Add port if specified.
This commit is contained in:
parent
e7dc39e40c
commit
d18473f0c3
3 changed files with 21 additions and 15 deletions
|
|
@ -20,13 +20,6 @@ defmodule Pleroma.Upload do
|
|||
end
|
||||
|
||||
defp url_for(file) do
|
||||
host =
|
||||
Application.get_env(:pleroma, Pleroma.Web.Endpoint)
|
||||
|> Keyword.fetch!(:url)
|
||||
|> Keyword.fetch!(:host)
|
||||
|
||||
protocol = Application.get_env(:pleroma, Pleroma.Web.Endpoint) |> Keyword.fetch!(:protocol)
|
||||
|
||||
"#{protocol}://#{host}/media/#{file}"
|
||||
"#{Pleroma.Web.base_url()}/media/#{file}"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue