Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files Uploads (Media Model) #25

Open
20 tasks done
ddavisgraphics opened this issue Dec 7, 2020 · 0 comments
Open
20 tasks done

Files Uploads (Media Model) #25

ddavisgraphics opened this issue Dec 7, 2020 · 0 comments

Comments

@ddavisgraphics
Copy link
Contributor

ddavisgraphics commented Dec 7, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant