mirror of
https://github.com/algora-io/tv.git
synced 2025-03-27 20:20:18 +02:00
rollback manually selecting upload regions
This commit is contained in:
parent
c408fea173
commit
9b5d2c73db
@ -55,7 +55,7 @@ defmodule Algora.Storage do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp upload_regions do
|
def upload_regions do
|
||||||
[System.get_env("FLY_REGION") || "fra", "sjc", "fra"]
|
[System.get_env("FLY_REGION") || "fra", "sjc", "fra"]
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
|> Enum.join(",")
|
|> Enum.join(",")
|
||||||
@ -128,7 +128,7 @@ defmodule Algora.Storage do
|
|||||||
|
|
||||||
def upload_to_bucket(contents, remote_path, bucket, opts \\ []) 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 = 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, [])
|
ExAws.request(op, [])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user