mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Disable S3 Upload and use PutObject instead
This commit is contained in:
parent
ffe07cce3d
commit
8b44b0ed0a
1 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue