Merge branch 'features/s3-uploader-digital-ocean' into 'develop'

add overriding truncated_namespace condition for truncating paths for digital ocean

See merge request pleroma/pleroma!969
This commit is contained in:
kaniini 2019-03-25 02:25:59 +00:00
commit bc14c98de1

View file

@ -13,9 +13,14 @@ def get_file(file) do
bucket = Keyword.fetch!(config, :bucket) bucket = Keyword.fetch!(config, :bucket)
bucket_with_namespace = bucket_with_namespace =
if namespace = Keyword.get(config, :bucket_namespace) do cond do
truncated_namespace = Keyword.get(config, :truncated_namespace) ->
truncated_namespace
namespace = Keyword.get(config, :bucket_namespace) ->
namespace <> ":" <> bucket namespace <> ":" <> bucket
else
true ->
bucket bucket
end end