Uploadex v0.1.2 Uploadex.Files View Source

Functions to store and delete files. This is an abstraction on top of the Arc.Actions.Store and Arc.Actions.Delete, dealing with all files of a given record.

Link to this section Summary

Functions

Deletes all files for a record. Used in delete functions.

Deletes all files that changed. Used in update functions.

Stores all files of a record, as defined by the uploader. Used in insert functions.

Link to this section Functions

Link to this function

delete_files(record, uploader) View Source

Deletes all files for a record. Used in delete functions.

Link to this function

delete_previous_files(new_record, previous_record, uploader) View Source

Deletes all files that changed. Used in update functions.

Link to this function

store_files(record, uploader) View Source

Stores all files of a record, as defined by the uploader. Used in insert functions.

Since uploader.store only accepts maps, files that are not in that format are ignored. This allows for assigning an existing file to a record without recreating it, by simply passing it's filename.