mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 14:41:53 +08:00
Merge pull request #2070 from aignatov-bio/ai-sci-3874-error-handling-when-image-unavalialbe-for-base64
Error handling, when image unavaliable for base64 [SCI-3874]
This commit is contained in:
commit
7951ae4218
1 changed files with 3 additions and 0 deletions
|
@ -11,5 +11,8 @@ module ImageVariantProcessing
|
|||
end
|
||||
encoded_data = Base64.strict_encode64(image_link)
|
||||
"data:#{variant.image.blob.content_type};base64,#{encoded_data}"
|
||||
rescue StandardError => e
|
||||
Rails.logger.error e.message
|
||||
"data:#{variant.image.blob.content_type};base64,"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue