mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
adjust text signature size
This commit is contained in:
1 parent
6666f39928
commit
811091ff14
1 file changed
+2
-2
@@ -118,12 +118,12 @@ module Submitters
|
||||
blob =
|
||||
if value.match?(%r{\Ahttps?://})
|
||||
find_or_create_blob_from_url(account, value)
|
||||
elsif type.in?(%w[signature initials]) && value.length < 50
|
||||
elsif type.in?(%w[signature initials]) && value.length < 60
|
||||
find_or_create_blob_from_text(account, value, type)
|
||||
elsif (data = Base64.decode64(value)) && Marcel::MimeType.for(data).include?('image')
|
||||
find_or_create_blob_from_base64(account, data, type)
|
||||
else
|
||||
raise InvalidDefaultValue, "Invalid value, url, base64 or text < 50 chars is expected: #{value.first(50)}..."
|
||||
raise InvalidDefaultValue, "Invalid value, url, base64 or text < 60 chars is expected: #{value.first(200)}..."
|
||||
end
|
||||
|
||||
attachment = for_submitter.attachments.find_by(blob_id: blob.id) if for_submitter
|
||||
|
||||
Reference in new issue
Block a user