Skip to content

Commit

Permalink
Log options passed to AddFileToFileSet
Browse files Browse the repository at this point in the history
This will aid us in debugging #1235
  • Loading branch information
jcoyne committed Jun 9, 2017
1 parent 9bf83f9 commit 6678949
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/jobs/ingest_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class IngestFileJob < Hyrax::ApplicationJob
def perform(file_set, filepath, user, opts = {})
relation = opts.fetch(:relation, :original_file).to_sym

logger.debug("Performing ingest of \"#{filepath}\" with options: #{opts.inspect}")
# Wrap in an IO decorator to attach passed-in options
local_file = Hydra::Derivatives::IoDecorator.new(File.open(filepath, "rb"))
local_file.mime_type = opts.fetch(:mime_type, nil)
Expand Down

0 comments on commit 6678949

Please sign in to comment.