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

[Feature] support Stream -> Async<Stream> #285

Open
Zaid-Ajaj opened this issue Dec 7, 2021 · 0 comments
Open

[Feature] support Stream -> Async<Stream> #285

Zaid-Ajaj opened this issue Dec 7, 2021 · 0 comments

Comments

@Zaid-Ajaj
Copy link
Owner

Although byte[] -> Async<byte[]> gets the job done, it is not ideal because it means data is allocated in memory. Supporting Stream makes more sense for file uploads and downloads:

  • Stream -> Async<'T> for upload
  • 'T -> Async<Stream> for download

Fable doesn't support Stream but I think we can work around that using extension methods like the ones we have for byte[].

TypeInfo from SimpleJson needs to be extended so that it knows how to work with Stream

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

No branches or pull requests

1 participant