Uploadex v1.0.3 Uploadex.Files View Source

Functions to store and delete files.

Link to this section Summary

Functions

Deletes all files for a record.

Deletes all files that changed.

Stores all files of a record, as defined by the uploader.

Link to this section Types

Link to this section Functions

Link to this function

delete_files(record)

View Source
delete_files(record()) :: {:ok, record()} | {:error, any()}

Deletes all files for a record.

Link to this function

delete_previous_files(new_record, previous_record)

View Source
delete_previous_files(record(), record()) :: {:ok, record()} | {:error, any()}

Deletes all files that changed.

Link to this function

get_file_url(record)

View Source
get_file_url(record()) :: String.t() | nil | {:error, String.t()}
Link to this function

get_file_url(record, file)

View Source
get_file_url(record(), String.t()) :: String.t() | nil | {:error, String.t()}
Link to this function

get_files_url(record)

View Source
get_files_url(record()) :: [String.t()]
Link to this function

get_files_url(record, files)

View Source
get_files_url(record(), String.t() | [String.t()]) :: [String.t()]
Link to this function

store_files(record)

View Source
store_files(record()) :: {:ok, record()} | {:error, any()}

Stores all files of a record, as defined by the uploader.

Files that are not maps are ignored, which allows for assigning an existing file to a record without recreating it, by simply passing it's filename.