Class: Hyrax::ActiveEncode::PersistActiveEncodeDerivatives

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/active_encode/persist_active_encode_derivatives.rb

Class Method Summary collapse

Class Method Details

.call(output, directives) ⇒ Object

Parameters:

  • output (ActiveEncode::Output)

    the output from the active_encode adapter

  • directives (Hash)

    directions which can be used to determine where to persist to.

Options Hash (directives):

  • local_streaming (String)

    flag for copying to Hyrax derivative directory

  • file_set_id (String)

    the id of the file set to add the derivative



10
11
12
13
14
# File 'app/services/hyrax/active_encode/persist_active_encode_derivatives.rb', line 10

def self.call(output, directives)
  file_set = ActiveFedora::Base.find(directives[:file_set_id])
  output.url = move_derivative(output, file_set) if directives[:local_streaming]
  create_pcdm_file(output, file_set)
end