fix: increase body parser limit to 50mb for large PDF uploads
Claude API supports up to 32MB PDFs; base64 encoding adds ~33% overhead. 50mb body limit covers the maximum single-document upload case. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c9367ee22a
commit
4987cad881
|
|
@ -17,8 +17,8 @@ process.on('uncaughtException', (error) => {
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create<NestExpressApplication>(AgentModule);
|
const app = await NestFactory.create<NestExpressApplication>(AgentModule);
|
||||||
// Increase body parser limit for base64 image attachments (default 100KB is too small)
|
// Claude API: max 32MB PDF + 5MB images; base64 adds ~33% overhead → 50mb covers all cases
|
||||||
app.useBodyParser('json', { limit: '10mb' });
|
app.useBodyParser('json', { limit: '50mb' });
|
||||||
// Use raw WebSocket adapter instead of Socket.IO
|
// Use raw WebSocket adapter instead of Socket.IO
|
||||||
app.useWebSocketAdapter(new WsAdapter(app));
|
app.useWebSocketAdapter(new WsAdapter(app));
|
||||||
const config = app.get(ConfigService);
|
const config = app.get(ConfigService);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue