refacto express limit size

This commit is contained in:
Arnaud D. Natali 2023-10-09 18:14:32 +02:00 committed by GitHub
commit 7fd4a4fb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {