Next.js Discord

Discord Forum

File Size Limit With App Router

Answered
Common Goldeneye posted this in #help-forum
Open in Discord
Common GoldeneyeOP
Currently building an app which required large files to be uploaded

Im using the app router and next 14

export async function POST(request: Request) {
  const buffer = Buffer.from(await file.arrayBuffer());
... }


export const config = {
  api: {
    bodyParser: {
      sizeLimit: "100mb",
    },
  },
};


Error: export const config in .../route.ts is deprecated.

https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config

has no reference to the size limit config in current versions
Answered by Common Goldeneye
turns out it was the nginx proxy I had ontop of it
View full answer

6 Replies

Common GoldeneyeOP
turns out it was the nginx proxy I had ontop of it
Answer
Common GoldeneyeOP
lmfao
cloudflare, nginx and next all fighting over who can limit my file size