Do not prepend /media/ when using base_url
This ensures admin has full control over the path where media resides.
This commit is contained in:
parent
7286cdff7a
commit
84fca14c3c
2 changed files with 36 additions and 19 deletions
|
|
@ -228,7 +228,14 @@ defmodule Pleroma.Upload do
|
|||
""
|
||||
end
|
||||
|
||||
[base_url, "media", path]
|
||||
prefix =
|
||||
if is_nil(Pleroma.Config.get([__MODULE__, :base_url])) do
|
||||
"media"
|
||||
else
|
||||
""
|
||||
end
|
||||
|
||||
[base_url, prefix, path]
|
||||
|> Path.join()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue