Skip to content

Files Uploads (Media Model)  #25

@ddavisgraphics

Description

@ddavisgraphics

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions