You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I intuitively expected that all operation with files and fetch/s3 will use streaming under the hood without buffering whole file in memory.
What do you see instead?
await uploadFileToUrl() <- buffers whole file in memory
await uploadFileStreamToUrl() <- fails with 411 http status, because content length is not known, even if I add header
await uploadFileToS3() <- buffers whole file in memory
await downloadFileFromUrl() <- buffers whole file in memory
await downloadFileFromS3() <- streams as expected
Additional information
No response
The text was updated successfully, but these errors were encountered:
Indeed the way streams are consumed today this can happen, bun will free the memory as soon it can, but it can buffer the whole file, this will be change to another implementation that is more memory efficient
What version of Bun is running?
1.2.1
What platform is your computer?
Darwin 24.2.0 arm64 arm
What steps can reproduce the bug?
there is code for uploading or downloading files using various methods in bun
most of them buffer whole file content in memory before sending
What is the expected behavior?
I intuitively expected that all operation with files and fetch/s3 will use streaming under the hood without buffering whole file in memory.
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: