refacto express limit size

This commit is contained in:
OxSaitama 2023-10-09 18:13:36 +02:00
parent 1d82a931f1
commit 8ee7d9b9ba

View File

@ -25,12 +25,11 @@ const storage = multer.memoryStorage();
middlwares: [ middlwares: [
cors({ origin: "*" }), cors({ origin: "*" }),
multer({ storage: storage, limits: { fileSize: 32000000 } }).single("file"), //32 MB maximum multer({ storage: storage, limits: { fileSize: 32000000 } }).single("file"), //32 MB maximum
bodyParser.urlencoded({ extended: true }), bodyParser.json({ limit: "35mb"}),
bodyParser.json(), bodyParser.urlencoded({ extended: true, limit: "35mb", parameterLimit: 50000 }),
], ],
errorHandler, errorHandler,
}); });
routes.start(); routes.start();
} catch (e) { } catch (e) {