Class: Hyrax::PersistDirectlyContainedOutputFileService
- Inherits:
-
Hydra::Derivatives::PersistBasicContainedOutputFileService
- Object
- Hydra::Derivatives::PersistBasicContainedOutputFileService
- Hyrax::PersistDirectlyContainedOutputFileService
- Defined in:
- app/services/hyrax/persist_directly_contained_output_file_service.rb
Overview
This Service is an implementation of the Hydra::Derivatives::PersistOutputFileService It supports directly contained files
Class Method Summary collapse
-
.call(content, directives) ⇒ Object
This method conforms to the signature of the .call method on Hydra::Derivatives::PersistOutputFileService * Persists the file within the DirectContainer specified by :container.
Class Method Details
.call(content, directives) ⇒ Object
This method conforms to the signature of the .call method on Hydra::Derivatives::PersistOutputFileService
-
Persists the file within the DirectContainer specified by :container
13 14 15 16 17 18 19 20 21 |
# File 'app/services/hyrax/persist_directly_contained_output_file_service.rb', line 13 def self.call(content, directives) file = io(content, directives) file_set = retrieve_file_set(directives) remote_file = retrieve_remote_file(file_set, directives) remote_file.content = file remote_file.mime_type = determine_mime_type(file) remote_file.original_name = determine_original_name(file) file_set.save end |