mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-12 12:15:04 +00:00
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:
commit
bc14c98de1
1 changed files with 9 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue