Vercel Functions 開放接收最大 20MiB 的請求資料
Vercel Functions now support request bodies up to 20MiB
Vercel Functions 現在在 Public Beta 中可接收最大 20MiB 的請求資料,原本上限是 4.5MB。
- 要使用較大的上限,必須設定環境變數
VERCEL_SUPPORT_LARGE_REQUEST_BODY=1,並讓專案的函式使用 4GB 效能記憶體設定。 - 功能適用於 Node.js、Python、Bun 和 Routing Middleware。Edge runtime 仍維持 4.5MB 上限,超過會回傳 413。啟用後,Routing Middleware 看得到請求標頭和其他資料,但收不到請求本文。
- 處理大檔案時也要盡快讀取,避免記憶體和傳輸壓力。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
# Vercel Functions now support request bodies up to 20MiB - Vercel
Skip to content
[](https://vercel.com/home)
Copy Wordmark Copy Logo
Download Brand Assets Brand Guidelines
Products
Agent Stack
Core Platform
Tools
Resources
Learn
Build
Explore
Ask AIDashboard
- * *
Products
Agent Stack
Core Platform
Tools
Resources
Learn
Build
Explore
Vercel Functions now support request bodies up to 20MiB


+3
Gal Schlezinger, Casey Gowrie, Craig Andrews, Sudais Moorad, Shohei Maeda
20 Nov 2026
1 min read
Copy
Vercel Functions now accept inbound request bodies up to 20MiB, up from 4.5MB, in Public Beta.
To turn this on, set the VERCEL_SUPPORT_LARGE_REQUEST_BODY=1 environment variable. The opt-in applies to the whole project in the environment where you set it, so you can test the larger limit on preview before enabling it in production. It requires the project's functions to use the performance memory setting of 4GB. It applies to functions on the Node.js, Python, and Bun runtimes, and to Routing Middleware. Functions and Routing Middleware on the Edge runtime keep the 4.5MB cap and return 413 on oversize bodies, so moving them onto the larger limit means switching to the Node.js runtime with runtime: 'nodejs', or proxy.ts in Next.js.
When a project opts in, Routing Middleware receives request headers and metadata but no request body, enforced at the project level. Middleware still runs and still sees every other request header, so body-dependent middleware behavior is the one thing that becomes unavailable. This avoids sending the body twice, to both middleware and the target function, which would raise cost and time to first byte.
When handling larger request bodies, read the body promptly and avoid holding it in memory to prevent backpressure and memory issues.
Learn more in the Vercel Functions limitations documentation.
Agent Stack
Core Platform
Security
Tools
Frameworks
SDKs
Build
Learn
Explore
Company
Legal & Trust
- Privacy Policy
- Terms of Service
- Cookie Policy
- DPA
- Acceptable Use Policy
- Legal (all documents)
- Trust Center
- Status
- Cookie Preferences
Social
Select a display theme:system light dark