Class: Hydra::Works::UploadFileToFileSet
- Inherits:
-
Object
- Object
- Hydra::Works::UploadFileToFileSet
- Defined in:
- lib/hydra/works/services/upload_file_to_file_set.rb
Class Method Summary collapse
-
.call(file_set, file, additional_services: [], update_existing: true, versioning: true) ⇒ Object
Sets a file as the primary file (original_file) of the file_set.
Class Method Details
.call(file_set, file, additional_services: [], update_existing: true, versioning: true) ⇒ Object
Sets a file as the primary file (original_file) of the file_set
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/hydra/works/services/upload_file_to_file_set.rb', line 10 def self.call(file_set, file, additional_services: [], update_existing: true, versioning: true) Hydra::Works::AddFileToFileSet.call(file_set, file, :original_file, update_existing: update_existing, versioning: versioning) # Call any additional services additional_services.each do |service| service.call(file_set) end file_set.save file_set end |