1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-12-25 04:53:06 +00:00

truncated_namespace should default to nil

This commit is contained in:
Mark Felder 2021-01-13 11:54:00 -06:00
parent 67e888498c
commit f0ab60189e
3 changed files with 6 additions and 4 deletions

View file

@ -72,7 +72,7 @@
config :pleroma, Pleroma.Uploaders.S3,
bucket: nil,
bucket_namespace: nil,
truncated_namespace: false,
truncated_namespace: nil,
streaming_enabled: true
config :ex_aws, :s3,

View file

@ -229,13 +229,15 @@ def base_url do
Pleroma.Uploaders.S3 ->
bucket = Config.get([Pleroma.Uploaders.S3, :bucket])
truncated_namespace = Config.get([Pleroma.Uploaders.S3, :truncated_namespace])
namespace = Config.get([Pleroma.Uploaders.S3, :bucket_namespace])
bucket_with_namespace =
cond do
truncated_namespace = Config.get([Pleroma.Uploaders.S3, :truncated_namespace]) ->
!is_nil(truncated_namespace) ->
truncated_namespace
namespace = Config.get([Pleroma.Uploaders.S3, :bucket_namespace]) ->
!is_nil(namespace) ->
namespace <> ":" <> bucket
true ->

View file

@ -59,7 +59,7 @@ config :pleroma, Pleroma.Uploaders.Local, uploads: "<%= uploads_dir %>"
# config :pleroma, Pleroma.Uploaders.S3,
# bucket: "some-bucket",
# bucket_namespace: "my-namespace",
# truncated_namespace: false,
# truncated_namespace: nil,
# streaming_enabled: true
#
# Configure S3 credentials: