Merge pull request #8630 from okriuchykhin/ok_SCI_12103

Fix preview generation for non image files [SCI-12103]
This commit is contained in:
Martin Artnik 2025-07-03 14:45:30 +02:00 committed by GitHub
commit d4b8a4e79c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,11 +105,11 @@ class Asset < ApplicationRecord
end
def medium_preview
preview_attachment.variant(resize_to_limit: Constants::MEDIUM_PIC_FORMAT, format: image_preview_format(blob))
preview_attachment.representation(resize_to_limit: Constants::MEDIUM_PIC_FORMAT, format: image_preview_format(blob))
end
def large_preview
preview_attachment.variant(resize_to_limit: Constants::LARGE_PIC_FORMAT, format: image_preview_format(blob))
preview_attachment.representation(resize_to_limit: Constants::LARGE_PIC_FORMAT, format: image_preview_format(blob))
end
def file_name