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