Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ограничение файлов в nodeJS
- npm install raw-body
- import getRawBody from 'raw-body';
- app.use(function(req, res, next) {
- getRawBody(
- req,
- {
- length: req.headers['content-length'],
- limit: '500mb',
- },
- function(err) {
- if (err) return next(err);
- next();
- },
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement