truncated_namespace should default to nil
This commit is contained in:
parent
67e888498c
commit
f0ab60189e
|
@ -72,7 +72,7 @@
|
||||||
config :pleroma, Pleroma.Uploaders.S3,
|
config :pleroma, Pleroma.Uploaders.S3,
|
||||||
bucket: nil,
|
bucket: nil,
|
||||||
bucket_namespace: nil,
|
bucket_namespace: nil,
|
||||||
truncated_namespace: false,
|
truncated_namespace: nil,
|
||||||
streaming_enabled: true
|
streaming_enabled: true
|
||||||
|
|
||||||
config :ex_aws, :s3,
|
config :ex_aws, :s3,
|
||||||
|
|
|
@ -229,13 +229,15 @@ def base_url do
|
||||||
|
|
||||||
Pleroma.Uploaders.S3 ->
|
Pleroma.Uploaders.S3 ->
|
||||||
bucket = Config.get([Pleroma.Uploaders.S3, :bucket])
|
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 =
|
bucket_with_namespace =
|
||||||
cond do
|
cond do
|
||||||
truncated_namespace = Config.get([Pleroma.Uploaders.S3, :truncated_namespace]) ->
|
!is_nil(truncated_namespace) ->
|
||||||
truncated_namespace
|
truncated_namespace
|
||||||
|
|
||||||
namespace = Config.get([Pleroma.Uploaders.S3, :bucket_namespace]) ->
|
!is_nil(namespace) ->
|
||||||
namespace <> ":" <> bucket
|
namespace <> ":" <> bucket
|
||||||
|
|
||||||
true ->
|
true ->
|
||||||
|
|
|
@ -59,7 +59,7 @@ config :pleroma, Pleroma.Uploaders.Local, uploads: "<%= uploads_dir %>"
|
||||||
# config :pleroma, Pleroma.Uploaders.S3,
|
# config :pleroma, Pleroma.Uploaders.S3,
|
||||||
# bucket: "some-bucket",
|
# bucket: "some-bucket",
|
||||||
# bucket_namespace: "my-namespace",
|
# bucket_namespace: "my-namespace",
|
||||||
# truncated_namespace: false,
|
# truncated_namespace: nil,
|
||||||
# streaming_enabled: true
|
# streaming_enabled: true
|
||||||
#
|
#
|
||||||
# Configure S3 credentials:
|
# Configure S3 credentials:
|
||||||
|
|
Loading…
Reference in New Issue