cleaning up a bit.
This commit is contained in:
parent
709816a0f8
commit
0df558a6a5
5 changed files with 12 additions and 9 deletions
|
|
@ -1,7 +1,10 @@
|
|||
defmodule Pleroma.Uploaders.Local do
|
||||
def put_file(name, uuid, file, content_type) do
|
||||
|
||||
upload_path = get_upload_path(uuid, should_dedupe)
|
||||
alias Pleroma.Web
|
||||
|
||||
def put_file(name, uuid, file, _content_type, should_dedupe) do
|
||||
|
||||
upload_folder = get_upload_path(uuid, should_dedupe)
|
||||
url_path = get_url(name, uuid, should_dedupe)
|
||||
|
||||
File.mkdir_p!(upload_folder)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
defmodule Pleroma.Uploaders.S3 do
|
||||
|
||||
def put_file(name, uuid, path, content_type) do
|
||||
def put_file(name, uuid, path, content_type, _should_dedupe) do
|
||||
|
||||
settings = Application.get_env(:pleroma, Pleroma.Uploaders.S3)
|
||||
bucket = Keyword.fetch!(settings, :bucket)
|
||||
|
|
@ -12,7 +12,7 @@ defmodule Pleroma.Uploaders.S3 do
|
|||
|
||||
s3_name = "#{uuid}/#{name}"
|
||||
|
||||
{:ok, result} =
|
||||
{:ok, _} =
|
||||
ExAws.S3.put_object(bucket, s3_name, file_data, [
|
||||
{:acl, :public_read},
|
||||
{:content_type, content_type}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue