Module: Paperdragon::File::Reprocess

Included in:
Paperdragon::File
Defined in:
lib/paperdragon/file/operations.rb

Instance Method Summary collapse

Instance Method Details

#reprocess!(new_uid, original, metadata = {}) {|job| ... } ⇒ Object

Yields:

  • (job)


42
43
44
45
46
47
48
49
50
51
# File 'lib/paperdragon/file/operations.rb', line 42

def reprocess!(new_uid, original, ={})
  job = Dragonfly.app.new_job(original.data) # inheritance here somehow?

  yield job if block_given?

  old_uid = uid
  uid!(new_uid) # new UID is already computed and set.

  upload!(job, old_uid, new_uid, )
end