fix submission result
This commit is contained in:
@@ -49,7 +49,7 @@ module Submissions
|
||||
attachment.download
|
||||
else
|
||||
Vips::Image.new_from_buffer(attachment.download, '')
|
||||
.write_to_buffer('.jpg', Q: 40)
|
||||
.write_to_buffer('.png')
|
||||
end
|
||||
|
||||
io = StringIO.new(image_data)
|
||||
|
||||
@@ -15,7 +15,7 @@ module Templates
|
||||
def call(attachment)
|
||||
if attachment.content_type == PDF_CONTENT_TYPE
|
||||
generate_pdf_preview_images(attachment)
|
||||
elsif attachment.content_type.starts_with?('image/')
|
||||
elsif attachment.image?
|
||||
generate_preview_image(attachment)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user