Increase image constraints to 6 MB / 4096 px
Matches WhisperSystems/Signal-Android@d2be49af Closes #1055 // FREEBIE
This commit is contained in:
parent
053bf20185
commit
e8de2f0c52
1 changed files with 5 additions and 5 deletions
|
@ -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':
|
||||||
|
|
Loading…
Reference in a new issue