Skip to content
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

Use the Fetch with ReadableStream to support request streams in the Connect for Web. #599

Closed
gartz opened this issue May 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@gartz
Copy link

gartz commented May 1, 2023

Is your feature request related to a problem? Please describe.
Use the bytes feature to upload files from the browser to the server using request stream.

Describe the solution you'd like
Connect for Web : Add support to request stream using ReadableStream instance being passed to the request body.

Describe alternatives you've considered
If you've proposed a solution, are there any alternatives? Why are they worse
than your preferred approach?
Using unary. It's worse because large files it quite loads the client and server memory. Also there is no way to implement resuming upload when using unary calls.

@gartz gartz added the enhancement New feature or request label May 1, 2023
@timostamm
Copy link
Member

Hey Gabriel, we have our eyes on this feature, but unfortunately, it is not widely available yet. See https://developer.mozilla.org/en-US/docs/Web/API/Request/body#browser_compatibility for context.

It might be worth giving it a try with the full implementation of the Transport (instead of the slimmed down one from @bufbuild/connect-web). You can see an example here: #577 (comment)

@timostamm
Copy link
Member

I'll close this as a duplicate of #669, which has a bit more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants