Change MAX_IMAGE_PIXELS

Increase IMAGE_LIMIT, VIDEO_LIMIT
This commit is contained in:
wuyingren 2019-06-12 22:06:38 +08:00
parent 6fef22365d
commit 43341d82db
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
import EXIF from 'exif-js';
const MAX_IMAGE_PIXELS = 1638400; // 1280x1280px
const MAX_IMAGE_PIXELS = 3686400; //1920x1920px
const getImageUrl = inputFile => new Promise((resolve, reject) => {
if (window.URL && URL.createObjectURL) {

View file

@ -40,7 +40,7 @@ class MediaAttachment < ApplicationRecord
IMAGE_STYLES = {
original: {
pixels: 1_638_400, # 1280x1280px
pixels: 3_686_400 #1920x1920px
file_geometry_parser: FastGeometryParser,
},
@ -83,8 +83,8 @@ class MediaAttachment < ApplicationRecord
},
}.freeze
IMAGE_LIMIT = 8.megabytes
VIDEO_LIMIT = 40.megabytes
IMAGE_LIMIT = 16.megabytes
VIDEO_LIMIT = 80.megabytes
belongs_to :account, inverse_of: :media_attachments, optional: true
belongs_to :status, inverse_of: :media_attachments, optional: true