Skip to content

Commit

Permalink
Merge pull request #69 from kinglozzer/kinglozzer-patch-1
Browse files Browse the repository at this point in the history
Fix checkImageResolution validation messages
  • Loading branch information
Aaron Carlino authored Feb 23, 2017
2 parents d94be1e + 639b062 commit 2d117c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/file_attachment_field.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ UploadInterface.prototype = {
var ratio = imageH / imageW,
maxWidth = Math.floor(Math.sqrt(maxPixels / ratio)),
maxHeight = Math.round(maxWidth * ratio);
callback(false, maxWidth, maxHeight);
callback(false, 'big', maxWidth, maxHeight);
}
if (pixels < minPixels) {
var ratio = imageH / imageW,
minWidth = Math.floor(Math.sqrt(minPixels / ratio)),
minHeight = Math.round(minWidth * ratio);
callback(false, minWidth, minHeight);
callback(false, 'small', minWidth, minHeight);

}

Expand Down

0 comments on commit 2d117c6

Please sign in to comment.