Open gal-yedidovich opened 5 months ago
Sadly there is no way to slice a Bun.file (yet)
I'm pretty sure we have tests that verify this works
oh this is using express, that makes more sense
@Jarred-Sumner
I'm pretty sure we have tests that verify this works
Can you direct me to an example?
What version of Bun is running?
1.1.4
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
I created a sample http server using
express
that streams videos with range requests, but it seems that bun is not able to handle it and the request is loading indefinitely.here is an express sample project code:
server.js
also,
index.html
:Using
Bun.file
I tried also using the standard Bun way with
Bun.file('path')
, it seems to download the entire file instead of serving the requested range.What is the expected behavior?
I'm expecting bun to support every use case of video streaming
express
libraryBun.file('path')
What do you see instead?
express
example: The request is indefinite, and does not ever endsBun.file
(withBun.serve
): The video file is served from beginning before video reaching the requested start-rangeAdditional information
I also tried it with Elysia to be sure there is no workaround with a supporting framework, I got the similar result as using only
Bun.serve
withBun.file
server.ts
: (serving identicalindex.html
for the client)