mirror of
https://github.com/docusealco/docuseal
synced 2026-11-10 07:42:32 -05:00
fix image
This commit is contained in:
1 parent
05647135bc
commit
ff14caa9f7
2 files changed
+19
-3
No files matched your search
@@ -291,7 +291,16 @@ module Submissions
|
||||
),
|
||||
if field['type'].in?(%w[image signature initials stamp])
|
||||
attachment = submitter.attachments.find { |a| a.uuid == value }
|
||||
image = Vips::Image.new_from_buffer(attachment.download, '').autorot
|
||||
|
||||
image =
|
||||
begin
|
||||
Vips::Image.new_from_buffer(attachment.download, '').autorot
|
||||
rescue Vips::Error
|
||||
next unless attachment.content_type.starts_with?('image/')
|
||||
next if attachment.byte_size.zero?
|
||||
|
||||
raise
|
||||
end
|
||||
|
||||
scale = [600.0 / image.width, 600.0 / image.height].min
|
||||
|
||||
|
||||
Reference in new issue
Block a user