fix(pdf-compress): fix broken multipart parsing + add body size limit
Extreme mode: replace fragile manual multipart boundary parsing (which extracted only a fraction of large files, producing empty PDFs) with standard req.formData(). Add GS output validation + stderr capture. Stirling mode: parse formData first then build fresh FormData for Stirling instead of raw body passthrough (which lost data on large files). Add 5min timeout + original/compressed size headers. next.config: add 250MB body size limit for server actions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,11 @@ import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
experimental: {
|
||||
serverActions: {
|
||||
bodySizeLimit: '250mb',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user