-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Media
This is the model we are going to use to associate the files to items. The idea is to have this data in a few locations just in case because the previous system if this information was lost from the item it was not recoverable.
Previous System
- saves the archival path
- does not save a relation back to the item
- saves json in the item json for the file path and information
New System
- saves the file to a archival path and working path, only using the working path for the modifications to the file.
- save based on the UUID as in the previous system, but keep this information all located in an active record model
- save the item id in the media model so that there is another way to find it.
- create a returnable method for the paths and create a to json method that gathers all the information for the items submission.
Database
- id :bigint
- checksum :string
- file_errors :jsonb
- filename :string
- mime_type :string
- path :string
- size :string
- uuid :string
- virus_scanned :boolean
- created_at :datetimenotnull
- updated_at :datetimenotnull
- form_id :integer
- item_id :integer
Methods
- to_json
- uuid_path
- conversion_path
- archival_path
- working_path
- tmp_path
- export_path
Metadata
Metadata
Assignees
Labels
No labels