-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response FileBlob.slice() return full file #616
Comments
Hi @gornostay25, thanks for submitting this bug report. If you have time, do you mind providing an example that we can run to observe the issue? I tried to piece together what you provided but I don't think there's enough context. |
In the HTTP server (Bun.serve) right? If so, HTTP or HTTPS? |
function return promise to Bun.serve hendler
|
Is the workaround calling .arrayBuffer() or is that intentional? If it’s not intentional, could you try directly passing new Response(Bun.file(data.abs).slice(opts.start, opts.end), { headers: data.headers, status: code }) |
I don't know is it working now, but early it doesn't |
Should these lines contain this.offset? |
Fixed oven-sh/bun#616 / https://github.com/oven-sh/bun#streaming-files-with-bunserve Added Prettier Added polyfill FormData
@Jarred-Sumner
if I return a slice, I will receive a full file
So I try to return an arrayBuffer
It's work, but in docs slice return
FileBlob
(slice(begin?: number, end?: number): FileBlob;
)And Response constructor receive FileBlob **NOT arrayBuffer **
Originally posted by @gornostay25 in #589 (comment)
The text was updated successfully, but these errors were encountered: