-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Q] Fetch #13
Comments
The focus of this library is filesystem actions. For more advanced upload/download control, consider https://github.com/edeckers/react-native-blob-courier, it focuses on network, ignoring filesystem, so would compliment this library well. I have not used |
Thank you for your response. I will check out the package you mentioned however I would still suggest adding a background download feature with pause and resume since you are providing a fetch option. |
Hi @alpha0010, we've recently released https://github.com/georstat/react-native-image-cache, it would be nice to have resumable downloads like: https://github.com/wcandillon/react-native-expo-image-cache/blob/b81b99b01918558c7680595980d76003d507bc6f/src/CacheManager.ts#L29 in order to "improve" it. We hope/believe that it will get lot of traction. Thanks |
I looked a bit deeper into this. Using the system managed downloader might take a bit of work, but should be reasonably straight forward implementation.
App managed pause/resume for downloads would be more complicated. Would need to manage HTTP range requests, and handle servers that do not understand/obey them. On the plus side, this may be possible to implement js/ts side (on top of the existing APIs in this library), so might only need to implement once. Although, native side would be a bit more performant. Download progress events would need to be emitted from native code for higher resolution. I suppose rough events could be triggered from js if implemented range requests there. Not currently a priority for me, though I hope to look into at some point. Of course, accepting pull requests if you wish to help. |
Thanks for looking into it, I have no clue on native code so I can’t help on this part. I think everything should be done on native side as you stated. How are the other react native file system libs are handling such cases? (expo fs too) |
Added progress events in branch https://github.com/alpha0010/react-native-file-access/tree/download-progress . I plan to test a bit more before tagging a release. |
Thanks @alpha0010, if you want we can test too with the caching lib in real apps. |
Thanks. Just published, but of course if you notice any bugs in your testing/use, open an issue here. Download progress updates live in 1.7.0. |
Unfortunately, |
Thanks for your interest. To confirm, passing request body works for you (when using this library), but it is missing request cancel? |
@alpha0010 Thanks for reply. Yes, I use your library to download blobs right now because it supports passing a body to request. And I use |
Published a release; let me know how it works for you. |
@alpha0010 Cool, it was very fast reaction, mate! But I am sorry, can't test it this time. Already implemented a workaround with |
Thanks for the library. Any possibility to add support for copy progress ( FileSystem.cp)? |
Thanks for the library. I just found it today. I have few questions.
The text was updated successfully, but these errors were encountered: