mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +08:00
Merge pull request #8630 from okriuchykhin/ok_SCI_12103
Fix preview generation for non image files [SCI-12103]
This commit is contained in:
commit
d4b8a4e79c
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue