From 1b07bca0f496ead74754edaaf03c26384bb552b4 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 3 Jul 2025 14:26:18 +0200 Subject: [PATCH] Fix preview generation for non image files [SCI-12103] --- app/models/asset.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/asset.rb b/app/models/asset.rb index dfaee7281..071cb90e2 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -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