Increase image constraints to 6 MB / 4096 px

Matches WhisperSystems/Signal-Android@d2be49af

Closes #1055

// FREEBIE
This commit is contained in:
haffenloher 2017-02-08 18:31:12 +01:00 committed by lilia
parent 053bf20185
commit e8de2f0c52

View file

@ -79,9 +79,9 @@
img.onload = function () { img.onload = function () {
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
var maxSize = 4000 * 1024; var maxSize = 6000 * 1024;
var maxHeight = 2048; var maxHeight = 4096;
var maxWidth = 2048; var maxWidth = 4096;
if (img.width <= maxWidth && img.height <= maxHeight && if (img.width <= maxWidth && img.height <= maxHeight &&
file.size <= maxSize) { file.size <= maxSize) {
resolve(file); resolve(file);
@ -140,9 +140,9 @@
var blobType = file.type === 'image/gif' ? 'gif' : type; var blobType = file.type === 'image/gif' ? 'gif' : type;
switch (blobType) { switch (blobType) {
case 'image': case 'image':
limitKb = 4000; break; limitKb = 6000; break;
case 'gif': case 'gif':
limitKb = 5000; break; limitKb = 6000; break;
case 'audio': case 'audio':
limitKb = 100000; break; limitKb = 100000; break;
case 'video': case 'video':