When I try to fetch a large file (size 200mb) I get this error:
https://i.mrxbox98.me/file/2023/08/Code_gwbceX73Lq.png
Im trying to fetch it on the server side using the app router API routes
12 messages · Page 1 of 1 (latest)
When I try to fetch a large file (size 200mb) I get this error:
https://i.mrxbox98.me/file/2023/08/Code_gwbceX73Lq.png
Im trying to fetch it on the server side using the app router API routes
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
The fetch works normally when I try in node
do u mean it works in Vercel Node.js runtime, but it fails Vercel Edge runtime?
No, when I try the same exact fetch request it works in NodeJS but when its runned in a api route it errors out
nextjs has a request and response body limit, (they are configurable)
for large files they are typically served from a presigned url
also if you deploy to a serverless provider like vercel, fetching and sending a 200mb file may take longer than 60s (which is the max time a function can run)
Where can I configure it?