Open Ja4V8s28Ck opened 9 months ago
I am going through the same issue. Somehow using Postman and adding the file directly works but when sending images from reactnative creating a FormData it gets stuck
I believe the bug has been fixed in the newest version of Bun (1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a).
I'm still having the same issue
I'm still having the same issue
I've re-opened the issue
Commenting for reach and updates. I am experiencing the exact same issue on 1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a
Same here, i tried to run my app with ts-node-dev, and work perfectly, but when i run with bun, only upload of smallest files (20kb) works.
Same here, with express.js and express-fileupload
, which uses busboy
as dependency. The issue is that it doesnt show any error logs, it just hangs without exiting.
I install bun 1.0.7 and it works 🧤🎉
I can confirm that 1.0.7 does make this work.
However, if I use the useTempFiles
option passed to fileupload, it still has the same symptom of hanging indefinitely while parsing larger files. I believe this is due to how busboy
is creating a read/write stream to write the file to disk. I can reproduce the described issue while using a busboy-only implementation on Bun 1.0.7
I think https://github.com/flash-oss/graphql-upload-minimal is similly not working. It also depends on busboy
.
What version of Bun is running?
1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49
What platform is your computer?
Linux 6.4.0-kali3-amd64 x86_64 unknown
What steps can reproduce the bug?
The bug is when I try to use express-fileupload to upload an "image", it's stuck on uploading. I believe the problem is that busboy is not parsing or can't parse the data buffer sent.
To replicate the issue, I used the example files given by express-fileupload
Download index.js and index.html and the use app.listen to host index.html.
Install the dependencies
express and express-fileupload
, add thetype:"module"
in package.json.Then
bun run index.js
Get to the page ==> Choose an image ==> Click upload
Page stuck on loading. (No file uploaded)
And, I ran it with nodemon as
nodemon index.js
and the file uploads successfully.What is the expected behavior?
I enabled the debug option in express-fileupload to troubleshoot and know what went wrong. I ran index.js with nodemon again and saw the following.
What do you see instead?
While using bun, this happened
Additional information
I think something went wrong with the busboy parsing.