-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Use ReadableStream instead of a stream of bytes #23
Conversation
// display | ||
append_img_uri(uri); | ||
|
||
// dowbloadable link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
note, this will require changes in UplinkWeb similar to the constellation example. |
Previously, we would use an AsyncIterator for handling rust streams, and in some situations they do work well but it can be a problem when it comes to handling streams for files as these would be chunks of data that is streamed. While an AsyncIterator could handle it, it may not be idiomatic to work with other functions without redundant workarounds. Additionally, in some cases, would require to buffer the data, which is not ideal for large sums of data.
This PR, while more of a PoC, would begin the process of using
ReadableStream
in place ofAsyncIterator
, which should work best for different situations such as creating a blob to download files without the need to buffer them. In other situations, could probably be used in place ofAsyncIterator
for events, however that would need discussions to determine if that might be suitable.