fix: increase middleware body size limit to 500MB for PDF uploads
Next.js 16 truncates request bodies at 10MB in middleware layer, causing ECONNRESET for large PDF uploads. Set middlewareClientMaxBodySize to 500mb to allow large file uploads to reach the route handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,10 @@ import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
serverExternalPackages: ['busboy'],
|
||||
experimental: {
|
||||
middlewareClientMaxBodySize: '500mb',
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user