Fix base_url string trimming

This commit is contained in:
Roman Chvanikov 2020-01-28 17:07:46 +03:00
parent dea968463d
commit 804a702f97
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ def perform(
_ -> ""
end
base_url = Pleroma.Config.get([Pleroma.Upload, :base_url], Pleroma.Web.base_url())
base_url =
String.trim_trailing(
Pleroma.Config.get([Pleroma.Upload, :base_url], Pleroma.Web.base_url()),
"/"
)
file_path = String.trim_leading(href, "#{base_url}/#{prefix}")