formData never returns in request

I upload a formData with a file (note it works fine without files) and doing
const formData = await request.formData();
const formData = await request.formData();
it just hangs. I have no idea why. Anyone have any ideas?
8 Replies
Hello, I’m Allie!
How big is the file?
boywonder350
boywonder350OP13mo ago
@HardlyHolidayin’ 3-4MB
Hello, I’m Allie!
Probably not running out of memory then. If you convert it to a string, does it look fine?
boywonder350
boywonder350OP13mo ago
Let me try wtf no I convert it to base64 and it still hangs... let me try a different image huh wtf I went back to the formData approach and used a file that is 240KB instead of 3.5MB and it works... Is there some config on local wrangler that sets the body size? Seems like it only works with a file of max size around 600-700kb @HardlyHolidayin’ does that ring a bell at all? I guess I can just do multipart upload if file size is >500kb but seems like a bug somewhere
Hello, I’m Allie!
I don't think there is an inherent limit on that? Cloudflare does have a global 100 MB limit on uploads for free-plan users though, but this is substantially lower
boywonder350
boywonder350OP13mo ago
Yeah... I have not tried deploying it yet but super annoying on local development rn I cannot even use multipart locally lol because the files need to be more than 5mb
Hello, I’m Allie!
Just to test, does it work if you randomly generate a 5 MB file?
boywonder350
boywonder350OP13mo ago
So I just tried a 13MB file after I set up multi part support, and the first 5MB uploads, the next 5MB hangs forever. Currently updating my Mac and will try again after. Not sure wtf is wrong lol but it for sure is frustrating hmmph not it just hangs normally again Is there anyone on the cloudflare team that can help? Seems like it must be a bug with wrangler or something wow ok good news and bad news it doesn't hang forever [mf:inf] POST /events/jkoxkvra0h/upload 200 OK (31ms) [mf:inf] POST /events/jkoxkvra0h/upload 200 OK (307231ms) just for 5 minutes can confirm it is just a local wrangler thing
Want results from more Discord servers?
Add your server