Implement uploader behaviour

run formatter <#
This commit is contained in:
Thurloat 2018-08-28 09:57:41 -03:00
commit 8d2d7a8859
5 changed files with 10 additions and 10 deletions

View file

@ -1,9 +1,9 @@
defmodule Pleroma.Uploaders.Local do
@behaviour Pleroma.Uploaders.Uploader
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)

View file

@ -1,7 +1,7 @@
defmodule Pleroma.Uploaders.S3 do
@behaviour Pleroma.Uploaders.Uploader
def put_file(name, uuid, path, content_type, _should_dedupe) do
settings = Application.get_env(:pleroma, Pleroma.Uploaders.S3)
bucket = Keyword.fetch!(settings, :bucket)
public_endpoint = Keyword.fetch!(settings, :public_endpoint)

View file

@ -0,0 +1 @@