diff --git a/www/whiteboard/inner.js b/www/whiteboard/inner.js index 5dd436909..0af0b8ee1 100644 --- a/www/whiteboard/inner.js +++ b/www/whiteboard/inner.js @@ -363,6 +363,11 @@ define([ }); }; var addImageToCanvas = function (img) { + // 1 MB maximum + if (img.src && img.src.length > 1 * 1024 * 1024) { + UI.warn(Messages.upload_tooLargeBrief); + return; + } var w = img.width; var h = img.height; if (w 1 * 1024 * 1024) { + UI.warn(Messages.upload_tooLargeBrief); + return; + } reader.onload = function () { var img = new Image(); img.onload = function () {