We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am getting 413, File too Large error. While uploading a file to S3.
I have adjusted to the middleware config to accept 50mb.
body: { json: { maxFileSize: '50mb',//'100kb', //bytes('100kb'), // 100kb }, raw: { maxFileSize: '50mb', //'100kb' //bytes('100kb'), // 100kb }, text: { maxFileSize: '50mb', //'100kb' //bytes('100kb'), // 100kb }, urlencoded: { maxFileSize: '50mb', // '100kb' //bytes('100kb'), // 100kb }, },
Still when i try to upload 10mb file, i am getting the above error.
In the Body Parser Middle where, i have validate the maxFile, size and content-length.. every thing is as excepted, still i am getting this error;
@Injectable() export class AppTextBodyParserMiddleware implements NestMiddleware { private maxFile: number;
constructor(private readonly configService: ConfigService) { this.maxFile = this.configService.get<number>( 'middleware.body.text.maxFileSize' ); } use(req: Request, res: Response, next: NextFunction): void { console.log(`Max file size: ${this.maxFile}`); console.log(`Content-Length: ${req.headers['content-length']}`); bodyParser.text({ limit: this.maxFile, })(req, res, next); }
}
even i have removed the condition and return next() always , the error didn't disappear
constructor(private readonly configService: ConfigService) { this.maxFile = this.configService.get<number>( 'middleware.body.text.maxFileSize' ); } use(req: Request, res: Response, next: NextFunction): void { console.log(`Max file size: ${this.maxFile}`); console.log(`Content-Length: ${req.headers['content-length']}`); return next() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I am getting 413, File too Large error. While uploading a file to S3.
I have adjusted to the middleware config to accept 50mb.
body: {
json: {
maxFileSize: '50mb',//'100kb', //bytes('100kb'), // 100kb
},
raw: {
maxFileSize: '50mb', //'100kb' //bytes('100kb'), // 100kb
},
text: {
maxFileSize: '50mb', //'100kb' //bytes('100kb'), // 100kb
},
urlencoded: {
maxFileSize: '50mb', // '100kb' //bytes('100kb'), // 100kb
},
},
Still when i try to upload 10mb file, i am getting the above error.
In the Body Parser Middle where, i have validate the maxFile, size and content-length.. every thing is as excepted, still i am getting this error;
@Injectable()
export class AppTextBodyParserMiddleware implements NestMiddleware {
private maxFile: number;
}
even i have removed the condition and return next() always , the error didn't disappear
@Injectable()
export class AppTextBodyParserMiddleware implements NestMiddleware {
private maxFile: number;
}
The text was updated successfully, but these errors were encountered: