We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vercel has the maximum payload size for the request body or the response body of a Serverless Function is 4.5 MB.
So anytime this function is serving a file larger than 4.5 MB, I get 413: FUNCTION_PAYLOAD_TOO_LARGE error.
Is there any way to work around this using got
got
import got from 'got' const handler = async (req, res) => { if (req.method.toUpperCase() !== 'GET') return res.status(500).json({}); const content_id = req.query.id; const file = await myDataBase.getFile(content_id) const { url, original_filename, original_file_url } = file.meta; try { got.stream(original_file_url).pipe(res); } catch (error) { return res.status(500).send(null); } }; export default handler;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Vercel has the maximum payload size for the request body or the response body of a Serverless Function is 4.5 MB.
So anytime this function is serving a file larger than 4.5 MB, I get 413: FUNCTION_PAYLOAD_TOO_LARGE error.
Is there any way to work around this using
got
The text was updated successfully, but these errors were encountered: