ruby: wrap data-insert-image with images array

This commit is contained in:
sshakndr
2025-10-09 13:54:48 +07:00
parent 9cf63d12ef
commit 5466ebf523

View File

@ -357,16 +357,24 @@ class FileModel
# server url to the image
# direct url to the image
insert_image = if enable_direct_url? == true
{
images: [
{
fileType: 'svg', # image file type
url: "#{DocumentHelper.get_server_url(true)}/assets/logo.svg", # server url to the image
directUrl: "#{DocumentHelper.get_server_url(false)}/assets/logo.svg" # direct url to the image
}
]
}
else
{
images: [
{
fileType: 'svg', # image file type
url: "#{DocumentHelper.get_server_url(true)}/assets/logo.svg" # server url to the image
}
]
}
end
if JwtHelper.enabled? # check if a secret key to generate token exists or not