Sha256: 76df62c3c3eccbcfda980043e1c1c5ad17edd4181ff37d83bd7586f4a92951fd
Contents?: true
Size: 584 Bytes
Versions: 6
Compression:
Stored size: 584 Bytes
Contents
class IngestLocalFileJob < Hyrax::ApplicationJob queue_as Hyrax.config.ingest_queue_name # @param [FileSet] file_set # @param [String] path # @param [User] user def perform(file_set, path, user) file_set.label ||= File.basename(path) actor = Hyrax::Actors::FileSetActor.new(file_set, user) if actor.create_content(File.open(path)) FileUtils.rm(path) Hyrax.config.callback.run(:after_import_local_file_success, file_set, user, path) else Hyrax.config.callback.run(:after_import_local_file_failure, file_set, user, path) end end end
Version data entries
6 entries across 6 versions & 1 rubygems