Skip to content
Snippets Groups Projects
Commit bc14c98d authored by kaniini's avatar kaniini
Browse files

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
parents 63ffa484 6c96d68f
No related branches found
No related tags found
No related merge requests found
......@@ -13,10 +13,15 @@ defmodule Pleroma.Uploaders.S3 do
bucket = Keyword.fetch!(config, :bucket)
bucket_with_namespace =
if namespace = Keyword.get(config, :bucket_namespace) do
namespace <> ":" <> bucket
else
bucket
cond do
truncated_namespace = Keyword.get(config, :truncated_namespace) ->
truncated_namespace
namespace = Keyword.get(config, :bucket_namespace) ->
namespace <> ":" <> bucket
true ->
bucket
end
{:ok,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment