class Shrine::Derivation::Upload

  1. lib/shrine/plugins/derivation_endpoint.rb
Superclass: Command

Methods

Public Instance

  1. call

Public Instance methods

call(derivative = nil, **)

Uploads the derivation result to the dedicated location on the storage. If a file object is given, uploads that to the storage, otherwise calls the derivation block and uploads the result.

[show source]
    # File lib/shrine/plugins/derivation_endpoint.rb
649 def call(derivative = nil, **)
650   if derivative
651     upload(derivative, **)
652   else
653     upload(derivation.generate, delete: true, **)
654   end
655 end