Pleroma v1.1.9-10-g42f76306+dev Pleroma.Uploaders.Local View Source
Link to this section Summary
Link to this section Functions
Instructs how to get the file from the backend.
Used by Pleroma.Plugs.UploadedMedia
.
Callback implementation for Pleroma.Uploaders.Uploader.get_file/1
.
Put a file to the backend.
Returns:
:ok
which assumes{:ok, upload.path}
{:ok, spec}
where spec is:{:file, filename :: String.t}
to handle reads withget_file/1
(recommended)
This allows to correctly proxy or redirect requests to the backend, while allowing to migrate backends without breaking any URL.
{url, url :: String.t}
to bypassget_file/2
and use theurl
directly in the activity.{:error, String.t}
error information if the file failed to be saved to the backend.:wait_callback
will wait for an http post request at/api/pleroma/upload_callback/:upload_path
and call the uploader'shttp_callback/3
method.
Callback implementation for Pleroma.Uploaders.Uploader.put_file/1
.