]> cat aescling's git repositories - mastodon.git/commitdiff
Include max image dimensions in error (#11552)
authorArnout Engelen <github@bzzt.net>
Thu, 15 Aug 2019 18:20:20 +0000 (20:20 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 15 Aug 2019 18:20:20 +0000 (20:20 +0200)
app/models/concerns/attachmentable.rb

index 7c78bb45698dccf8e9036cc3e2eb53272ee2ba43..246c2c27cde2c8492192d90ec67f1fad7a2fb02e 100644 (file)
@@ -43,7 +43,7 @@ module Attachmentable
 
       width, height = FastImage.size(attachment.queued_for_write[:original].path)
 
-      raise Mastodon::DimensionsValidationError, "#{width}x#{height} images are not supported" if width.present? && height.present? && (width * height >= MAX_MATRIX_LIMIT)
+      raise Mastodon::DimensionsValidationError, "#{width}x#{height} images are not supported, must be below #{MAX_MATRIX_LIMIT} sqpx" if width.present? && height.present? && (width * height >= MAX_MATRIX_LIMIT)
     end
   end