class Shrine::Plugins::KitheDerivatives
Includes the Shrine
`derivatives` plugin with some configuration, and extra features. The metadata for shrine derivatives is stored in the same JSON as the main file.
-
default kithe storage location of :kithe_derivatives
-
nice metadata for derivatives, instead of default shrine fairly random (filename ends up used by default in content-disposition headers when delivered)
-
Includes kithe_persisted_derivatives with add_persisted_derivatives and create_persisted_derivatives methods for concurrency-safe derivative persisting.
## Shrine
derivatives references
shrinerb.com/docs/plugins/derivatives shrinerb.com/docs/processing
Public Class Methods
load_dependencies(uploader, *)
click to toggle source
# File lib/shrine/plugins/kithe_derivatives.rb, line 23 def self.load_dependencies(uploader, *) uploader.plugin :derivatives, storage: -> (derivative) do # default derivatives storage to :kithe_derivatives end uploader.plugin :kithe_persisted_derivatives uploader.plugin :kithe_derivative_definitions end