From 738c083d4af5a828d8a3e7dca0b1139c50e092ad Mon Sep 17 00:00:00 2001 From: Alex Lion Date: Tue, 4 Aug 2026 14:46:07 +0700 Subject: [PATCH] Fix http client for s3 --- config/config.exs | 3 +++ test/claper/tasks/converter_test.exs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/config/config.exs b/config/config.exs index a5d9e30..1231935 100644 --- a/config/config.exs +++ b/config/config.exs @@ -10,6 +10,9 @@ import Config config :claper, ecto_repos: [Claper.Repo] +config :ex_aws, + http_client: ExAws.Request.Req + # Configures the endpoint config :claper, ClaperWeb.Endpoint, render_errors: [view: ClaperWeb.ErrorView, accepts: ~w(html json), layout: false], diff --git a/test/claper/tasks/converter_test.exs b/test/claper/tasks/converter_test.exs index 907e99f..a6665ae 100644 --- a/test/claper/tasks/converter_test.exs +++ b/test/claper/tasks/converter_test.exs @@ -6,6 +6,12 @@ defmodule Claper.Tasks.ConverterTest do alias Claper.Presentations.PresentationFile alias Claper.Tasks.Converter + test "uses the available Req client for S3 requests" do + assert Application.fetch_env!(:ex_aws, :http_client) == ExAws.Request.Req + assert Code.ensure_loaded?(ExAws.Request.Req) + assert function_exported?(ExAws.Request.Req, :request, 5) + end + describe "regenerate_thumbnails/1" do test "uses convert when magick is unavailable" do storage_dir = unique_tmp_dir()