mirror of
https://github.com/docusealco/docuseal
synced 2026-11-14 15:52:32 -05:00
fix generation
This commit is contained in:
1 parent
99b3247cf7
commit
2a1a2cbd82
2 files changed
+9
-4
No files matched your search
@@ -19,6 +19,7 @@ module Submissions
|
|||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
TESTING_FOOTER = GenerateResultAttachments::TESTING_FOOTER
|
TESTING_FOOTER = GenerateResultAttachments::TESTING_FOOTER
|
||||||
|
UNSUPPORTED_IMAGE_TYPES = GenerateResultAttachments::UNSUPPORTED_IMAGE_TYPES
|
||||||
|
|
||||||
RTL_REGEXP = TextUtils::RTL_REGEXP
|
RTL_REGEXP = TextUtils::RTL_REGEXP
|
||||||
MAX_IMAGE_HEIGHT = 100
|
MAX_IMAGE_HEIGHT = 100
|
||||||
@@ -354,8 +355,9 @@ module Submissions
|
|||||||
|
|
||||||
field_type = field['type']
|
field_type = field['type']
|
||||||
|
|
||||||
if field_type == 'image' &&
|
if (field_type == 'image' || field_type == 'stamp') &&
|
||||||
submitter.attachments.find { |a| a.uuid == value }.then { |a| !a.image? || a.content_type == 'image/heic' }
|
submitter.attachments.find { |a| a.uuid == value }
|
||||||
|
.then { |a| !a.image? || a.content_type.in?(UNSUPPORTED_IMAGE_TYPES) }
|
||||||
field_type = 'file'
|
field_type = 'file'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ module Submissions
|
|||||||
|
|
||||||
SIGN_REASON = 'Signed with DocuSeal.com'
|
SIGN_REASON = 'Signed with DocuSeal.com'
|
||||||
|
|
||||||
|
UNSUPPORTED_IMAGE_TYPES = ['image/heic', 'image/avif'].freeze
|
||||||
|
|
||||||
RTL_REGEXP = TextUtils::RTL_REGEXP
|
RTL_REGEXP = TextUtils::RTL_REGEXP
|
||||||
|
|
||||||
TEXT_LEFT_MARGIN = 1
|
TEXT_LEFT_MARGIN = 1
|
||||||
@@ -300,8 +302,9 @@ module Submissions
|
|||||||
|
|
||||||
field_type = field['type']
|
field_type = field['type']
|
||||||
|
|
||||||
if field_type == 'image' &&
|
if (field_type == 'image' || field_type == 'stamp') &&
|
||||||
submitter.attachments.find { |a| a.uuid == value }.then { |a| !a.image? || a.content_type == 'image/heic' }
|
submitter.attachments.find { |a| a.uuid == value }
|
||||||
|
.then { |a| !a.image? || a.content_type.in?(UNSUPPORTED_IMAGE_TYPES) }
|
||||||
field_type = 'file'
|
field_type = 'file'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user