Pleroma v1.0.0-641-g7ab2dbbd Pleroma.Upload.Filter behaviour View Source

Upload Filter behaviour

This behaviour allows to run filtering actions just before a file is uploaded. This allows to:

  • morph in place the temporary file
  • change any field of a Pleroma.Upload struct
  • cancel/stop the upload

Link to this section Summary

Link to this section Functions

Link to this function

filter(list, upload) View Source
filter([module()], Pleroma.Upload.t()) ::
  {:ok, Pleroma.Upload.t()} | {:error, any()}

Link to this section Callbacks

Link to this callback

filter(arg1) View Source
filter(Pleroma.Upload.t()) :: :ok | {:ok, Pleroma.Upload.t()} | {:error, any()}