1
0
mirror of https://github.com/algora-io/tv.git synced 2025-03-17 20:17:45 +02:00

rollback manually selecting upload regions

This commit is contained in:
zafer 2024-06-04 16:47:00 +03:00
parent c408fea173
commit 9b5d2c73db

View File

@ -55,7 +55,7 @@ defmodule Algora.Storage do
end
end
defp upload_regions do
def upload_regions do
[System.get_env("FLY_REGION") || "fra", "sjc", "fra"]
|> Enum.uniq()
|> Enum.join(",")
@ -128,7 +128,7 @@ defmodule Algora.Storage do
def upload_to_bucket(contents, remote_path, bucket, opts \\ []) do
op = Algora.config([:buckets, bucket]) |> ExAws.S3.put_object(remote_path, contents, opts)
op = %{op | headers: op.headers |> Map.merge(%{"x-tigris-regions" => upload_regions()})}
# op = %{op | headers: op.headers |> Map.merge(%{"x-tigris-regions" => upload_regions()})}
ExAws.request(op, [])
end