Class: Kithe::AssetUploader
- Defined in:
- app/uploaders/kithe/asset_uploader.rb
Overview
The default shrine uploader class, for handling assets on Kithe::Asset.
TODO: Needs to handle validations somehow with direct uploads and backgrounding.
TODO: If we don’t add FITS and anti-virus, at least sketch out how they could be added by local app, make sure we have architecture to support it. Likely related to backgrounding metadata/validation.
TODO: PDF-specific metadata extraction (page number) (may need shrine feature), as well as locally customized metadata pattern in general.
FUTURE: Needs ways to customize. Including adding metadata extractors, validations, and also possibly changing things (like determine_mime_type analyzer etc)
* config that turns on/off or changes certain things?
* Way to supply your own completely custom Uploader class?
* Could be a sub-class of this one?
* Some kithe behavior implemented as shrine plugins so you can easily re-use?
FUTURE: Look at using client-side-calculated checksums to verify end-to-end. github.com/shrinerb/shrine/wiki/Using-Checksums-in-Direct-Uploads
When magic-byte analyzer can’t determine mime type, will fall back to ‘mediainfo` CLI if `Kithe.use_mediainfo` is true (defaults to true if mediainfo CLI is available). (We need better ways to customize uploader.)