adjust text signature size
This commit is contained in:
@@ -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