{:ok,
{:url,
Path.join([
- Keyword.fetch!(config, :public_endpoint),
+ Pleroma.Upload.base_url(),
bucket_with_namespace,
strict_encode(URI.decode(file))
])}}
import Mock
import ExUnit.CaptureLog
- setup do:
- clear_config(Pleroma.Uploaders.S3,
- bucket: "test_bucket",
- public_endpoint: "https://s3.amazonaws.com"
- )
+ setup do
+ clear_config(Pleroma.Upload,
+ uploader: Pleroma.Uploaders.S3
+ )
+
+ clear_config(Pleroma.Uploaders.S3,
+ bucket: "test_bucket",
+ public_endpoint: "https://s3.amazonaws.com"
+ )
+ end
describe "get_file/1" do
test "it returns path to local folder for files" do