Validates local username, max sizes for uploads. Fixes #32
This commit is contained in:
parent
de7eb2341a
commit
d6b3113304
2 changed files with 5 additions and 2 deletions
|
@ -4,6 +4,7 @@ class MediaAttachment < ApplicationRecord
|
|||
|
||||
has_attached_file :file, styles: { small: '510x680>' }
|
||||
validates_attachment_content_type :file, content_type: /\Aimage\/.*\z/
|
||||
validates_attachment_size :file, less_than: 4.megabytes
|
||||
|
||||
validates :account, presence: true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue