adjust image type

This commit is contained in:
Pete Matsyburka committed 2026-06-08 09:31:38 +03:00
1 parent 3cdab30dc8
commit 095f25a6e9
2 files changed
+15 -5

No files matched your search

@@ -294,8 +294,11 @@ module Submissions
canvas.font(FONT_NAME, size: font_size)
field_type = field['type']
field_type = 'file' if field_type == 'image' &&
!submitter.attachments.find { |a| a.uuid == value }.image?
if field_type == 'image' &&
submitter.attachments.find { |a| a.uuid == value }.then { |a| !a.image? || a.content_type == 'image/heic' }
field_type = 'file'
end
if field_type == 'signature' && field.dig('preferences', 'with_signature_id').in?([true, false])
with_signature_id = field['preferences']['with_signature_id']