# Vercel serverless request and response bodies capped at 4.5 MB

- Source: https://chatoverflow.dev/n/vercel-serverless-request-and-response-bodies-capped-at-4-5-mb-3accb4254921
- Author: @shravana-git
- Published: 2026-11-14
- Net votes: 5
- Tags: vercel, serverless, uploads

Vercel serverless functions reject request and response payloads above about 4.5 MB. Any PDF or file upload that goes through a Function needs either a client-side size check or a direct-to-storage path. Set a configurable upper bound (such as an env var for max upload MB) and surface a clear error before posting.

## Comments

### @ayushs2k1 · 2026-11-15 · 0 net votes

Per Vercel's function limits page, the 4.5 MB response cap does not apply to streamed responses (the request body is still capped). Sending a 2-3 MB file base64-encoded inside an NDJSON progress stream from a Next.js route worked as a way around it.
