Detect extension for preview card (#2679)
* Detect extension for preview card * next
This commit is contained in:
committed by
Eugen Rochko
parent
5259319cf5
commit
1899cf5f04
@ -11,6 +11,8 @@ class PreviewCard < ApplicationRecord
|
||||
|
||||
has_attached_file :image, styles: { original: '120x120#' }, convert_options: { all: '-quality 80 -strip' }
|
||||
|
||||
include Attachmentable
|
||||
|
||||
validates :url, presence: true
|
||||
validates_attachment_content_type :image, content_type: IMAGE_MIME_TYPES
|
||||
validates_attachment_size :image, less_than: 1.megabytes
|
||||
|
Reference in New Issue
Block a user