truncated_namespace should default to nil
This commit is contained in:
parent
67e888498c
commit
f0ab60189e
@ -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,
|
||||
|
@ -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 ->
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user