Merge branch 'master' into glitch-soc/merge-upstream
This commit is contained in:
@@ -25,8 +25,14 @@ class PostProcessMediaWorker
|
||||
media_attachment = MediaAttachment.find(media_attachment_id)
|
||||
media_attachment.processing = :in_progress
|
||||
media_attachment.save
|
||||
|
||||
# Because paperclip-av-transcover overwrites this attribute
|
||||
# we will save it here and restore it after reprocess is done
|
||||
previous_meta = media_attachment.file_meta
|
||||
|
||||
media_attachment.file.reprocess!(:original)
|
||||
media_attachment.processing = :complete
|
||||
media_attachment.file_meta = previous_meta
|
||||
media_attachment.save
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
|
Reference in New Issue
Block a user