Увеличил лимиты на загрузку\скачивание файлов до 50Мб

This commit is contained in:
Book Pauk
2019-02-08 19:07:26 +07:00
parent 586ef50363
commit e4c9bc4940
3 changed files with 6 additions and 3 deletions

View File

@@ -2,6 +2,8 @@ const c = require('./controllers');
const utils = require('./core/utils');
const multer = require('multer');
const maxUploadSize = 50*1024*1024;
function initRoutes(app, connPool, config) {
const misc = new c.MiscController(connPool, config);
const reader = new c.ReaderController(connPool, config);
@@ -20,7 +22,7 @@ function initRoutes(app, connPool, config) {
cb(null, utils.randomHexString(30));
}
});
const upload = multer({ storage, limits: {fileSize: 10*1024*1024} });
const upload = multer({ storage, limits: {fileSize: maxUploadSize} });
//routes
const routes = [