Push picture max edge to 2048 and max size to 4 MB
Closes #1032 and catches up with Android
This commit is contained in:
parent
400313f749
commit
e2cb45c1da
1 changed files with 4 additions and 4 deletions
|
@ -78,9 +78,9 @@
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
|
|
||||||
var maxSize = 420 * 1024;
|
var maxSize = 4000 * 1024;
|
||||||
var maxHeight = 1280;
|
var maxHeight = 2048;
|
||||||
var maxWidth = 1280;
|
var maxWidth = 2048;
|
||||||
if (img.width <= maxWidth && img.height <= maxHeight &&
|
if (img.width <= maxWidth && img.height <= maxHeight &&
|
||||||
file.size <= maxSize) {
|
file.size <= maxSize) {
|
||||||
resolve(file);
|
resolve(file);
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
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 = 420; break;
|
limitKb = 4000; break;
|
||||||
case 'gif':
|
case 'gif':
|
||||||
limitKb = 5000; break;
|
limitKb = 5000; break;
|
||||||
case 'audio':
|
case 'audio':
|
||||||
|
|
Loading…
Reference in a new issue