-
Notifications
You must be signed in to change notification settings - Fork 1
Support for download via byte stream #20
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
base: main
Are you sure you want to change the base?
Conversation
(fixed in fetch_api 1.0.1)
|
Another thing I noticed is that the code is not retrying using |
matibat
left a 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.
LGTM! Thank you!
| environment: | ||
| sdk: '>=2.18.5 <3.0.0' | ||
| flutter: 3.3.9 | ||
| flutter: 3.7.0 |
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.
TODO for @matibat: check what are the downsides of bumping the version for localizations
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.
Just FYR already fixed a bunch of localisation errors in the ArDrive-web PR
A few problems I encountered that lead me to this particular solution:
Rangeheader, thearweave.netgateway will eventually rate limit your requests, even with large chunks. Gateway then does exponential backoff which can seriously impact download time.diostreams are a lie - it downloads a buffer and wraps it inStream.valuepackage:httpon web still use XHR requests, also without real stream support: Migrate to thefetchAPI dart-lang/http#595So to get around all of these issues:
fetchon web (usingfetch_clientlibrary instead ofardrive-http.tsto handle the more complex js/dart interop)HttpClienton mobile which just worksI've confirmed that the memory usage on web is stable. Not sure how to confirm on mobile
Caveats of this method:
fetch. Seems that this cannot be fixed: Support for flow control? Zekfad/fetch_client#3