mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-20 08:30:59 +00:00
add overriding truncated_namespace condition for truncating paths for digital ocean
This commit is contained in:
parent
750de7d842
commit
6c96d68f77
1 changed files with 9 additions and 4 deletions
|
@ -13,10 +13,15 @@ defmodule Pleroma.Uploaders.S3 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
|
||||||
namespace <> ":" <> bucket
|
truncated_namespace = Keyword.get(config, :truncated_namespace) ->
|
||||||
else
|
truncated_namespace
|
||||||
bucket
|
|
||||||
|
namespace = Keyword.get(config, :bucket_namespace) ->
|
||||||
|
namespace <> ":" <> bucket
|
||||||
|
|
||||||
|
true ->
|
||||||
|
bucket
|
||||||
end
|
end
|
||||||
|
|
||||||
{:ok,
|
{:ok,
|
||||||
|
|
Loading…
Reference in a new issue