Content
@
0 reply
0 recast
0 reaction
Samuel ツ
@samuellhuber.eth
Anyone debugged "Error: Request Entity Too Large FUNCTION_PAYLOAD_TOO_LARGE" in Remix or Vite.js before? not sure how to properly accept > 3MB file uploads. using <Form method="post" encType="multipart/form-data" <input type="file" id="image" name="image" accept="image/*" required /> </Form> and then on the action (POST) handle it using @mjackson/form-data-parser but when calling that endpoint with either the default formData Handler or form-data-parser running into the request entity too large error for anything >= 3MB
5 replies
0 recast
4 reactions
Steve
@stevedylandev.eth
I know with Next they have a framework limit of 4mb that can be passed through API routes, wouldn’t surprise me if Remix had something similar since they too have hosting. I’ve worked around it by creating a temporary API key and uploading directly via the client instead of an API route https://pinata.cloud/blog/how-to-upload-to-ipfs-from-the-frontend-with-signed-jwts/
1 reply
0 recast
0 reaction
Steve
@stevedylandev.eth
Also looks like there is a maxPartSize in the createFileUploadHandler that is 3000000 by default so that’s probably it 👀 maybe try updating that if you haven’t already? https://remix.run/docs/en/main/utils/unstable-create-file-upload-handler
0 reply
0 recast
0 reaction