Pleroma v1.1.9-10-g42f76306+dev 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


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