projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
750de7d
)
add overriding truncated_namespace condition for truncating paths for digital ocean
author
Austin Lanari
<austin@jumanji.io>
Sun, 24 Mar 2019 18:32:09 +0000
(11:32 -0700)
committer
Austin Lanari
<austin@jumanji.io>
Sun, 24 Mar 2019 18:32:09 +0000
(11:32 -0700)
lib/pleroma/uploaders/s3.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/uploaders/s3.ex
b/lib/pleroma/uploaders/s3.ex
index e7de3f3e0de84da366987a3b0a89ca9429080c20..521daa93b6176d2d51aaa16159d89b987faa09ca 100644
(file)
--- a/
lib/pleroma/uploaders/s3.ex
+++ b/
lib/pleroma/uploaders/s3.ex
@@
-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,