diff --git a/app/models/concerns/attachment_image_processor_concern.rb b/app/models/concerns/attachment_image_processor_concern.rb index aee9fa9d6..cd0e3ff65 100644 --- a/app/models/concerns/attachment_image_processor_concern.rb +++ b/app/models/concerns/attachment_image_processor_concern.rb @@ -20,6 +20,7 @@ module AttachmentImageProcessorConcern return if blob.nil? return if blob.attachments.size != 1 return if blob.attachments.last.record_type == "Export" + return if !blob.content_type.in?(PROCESSABLE_TYPES) ImageProcessorJob.perform_later(blob) end diff --git a/config/initializers/authorized_content_types.rb b/config/initializers/authorized_content_types.rb index 2a9a38d78..497757957 100644 --- a/config/initializers/authorized_content_types.rb +++ b/config/initializers/authorized_content_types.rb @@ -21,7 +21,9 @@ RARE_IMAGE_TYPES = [ 'image/tiff' # multimedia x 3985 ] -AUTHORIZED_CONTENT_TYPES = AUTHORIZED_IMAGE_TYPES + AUTHORIZED_PDF_TYPES + [ +PROCESSABLE_TYPES = AUTHORIZED_IMAGE_TYPES + AUTHORIZED_PDF_TYPES + +AUTHORIZED_CONTENT_TYPES = PROCESSABLE_TYPES + [ # multimedia 'video/mp4', # multimedia x 2075 'video/quicktime', # multimedia x 486