Added size limit of 5 MB for screenshots
This commit is contained in:
parent
7e1bf0d152
commit
9377af7795
1 changed files with 1 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ class Screenshot < ActiveRecord::Base
|
|||
path: ':rails_root/public/screenshots/:id_partition/:style.png',
|
||||
url: '/screenshots/:id_partition/:style.png'
|
||||
validates_attachment_content_type :image, :content_type => 'image/png'
|
||||
validates_with AttachmentSizeValidator, :attributes => :image, :less_than => 5.megabytes
|
||||
|
||||
# Return caption for full-screen screenshots.
|
||||
# Takes the description of a screenshot if available.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue