From 8b44b0ed0a5489aef4b3ce713ce9b8675bfaaf72 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Tue, 28 Mar 2023 18:14:02 -0400 Subject: [PATCH] Disable S3 Upload and use PutObject instead --- lib/philomena/objects.ex | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/philomena/objects.ex b/lib/philomena/objects.ex index 8c18f039..fe1ff891 100644 --- a/lib/philomena/objects.ex +++ b/lib/philomena/objects.ex @@ -48,14 +48,8 @@ defmodule Philomena.Objects do # @spec upload(String.t(), String.t()) :: any() def upload(key, file_path) do - {_, mime} = Mime.file(file_path) - - run_all(fn opts -> - file_path - |> ExAws.S3.Upload.stream_file() - |> ExAws.S3.upload(opts[:bucket], key, content_type: mime, max_concurrency: 2) - |> ExAws.request!(opts[:config_overrides]) - end) + # Workaround for API rate limit issues on R2 + put(key, file_path) end #