diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb index 0d8c3ef..ff11a81 100644 --- a/app/uploaders/image_uploader.rb +++ b/app/uploaders/image_uploader.rb @@ -16,8 +16,8 @@ class ImageUploader < Shrine Attacher.validate do validate_size 0..MAX_SIZE - if validate_mime_type ALLOWED_TYPES - validate_max_dimensions MAX_DIMENSIONS + if validate_mime_type ALLOWED_TYPES, message: "must be a valid JPEG or PNG file" + validate_max_dimensions MAX_DIMENSIONS, message: "must be not larger than 2000x2000 pixels" end end