View Source Dropkick.Storage behaviour (dropkick v0.0.1)
Link to this section Summary
Callbacks
Copies the given file with the underlyning storage module. The underlyning implementation should accept the following options (besides any specific options)
Deletes the given file with the underlyning storage module.
Returns a success tuple with the deleted the file like: {:ok, %Dropkick.File{}}.
Reads the given file with the underlyning storage module.
Returns a success tuple with the content of the file like: {:ok, content}.
Stores the given file with the underlyning storage module. The underlyning implementation should accept the following options (besides any specific options)
Link to this section Callbacks
@callback copy(Dropkick.File.t(), String.t(), Keyword.t()) :: {:ok, Dropkick.File.t()} | {:error, String.t()}
Copies the given file with the underlyning storage module. The underlyning implementation should accept the following options (besides any specific options):
:move: Specifies if the file should be just copied or moved entirely, defaults tofalse.
Returns a success tuple with the file in the new destination like: {:ok, %Dropkick.File{}}.
Deletes the given file with the underlyning storage module.
Returns a success tuple with the deleted the file like: {:ok, %Dropkick.File{}}.
Reads the given file with the underlyning storage module.
Returns a success tuple with the content of the file like: {:ok, content}.
Stores the given file with the underlyning storage module. The underlyning implementation should accept the following options (besides any specific options):
:folder: The base location where to save the file being transfered.:prefix: A sub-folder inside the current location where the file is going to be saved, defaults to/.
Returns a success tuple like: {:ok, %Dropkick.File{}}.