From: Austin Lanari Date: Sun, 24 Mar 2019 18:32:09 +0000 (-0700) Subject: add overriding truncated_namespace condition for truncating paths for digital ocean X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=6c96d68f7715b7ce8f55ad7c880abeeabc2567d8;p=akkoma add overriding truncated_namespace condition for truncating paths for digital ocean --- diff --git a/lib/pleroma/uploaders/s3.ex b/lib/pleroma/uploaders/s3.ex index e7de3f3e0..521daa93b 100644 --- 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,