You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this a bug report, a feature request, or a question?
bug report / question
We've had an issue where some users are telling us download aren't working. Some of the downloads in our app are quite large (> 1 GB). I looked into it, and it looks like it's caused by the progress callback not being triggered.
if ([percent floatValue] - [prevPercent floatValue] > 0.01f) {
You will see a progress callback is only made if at least 1% of the progress has changed. But, for huge files, for example 1GB, that 1% is 10 megabytes. If a user is on a slow connection, that means they can be going 30 seconds+ without any sort of progress callback, which makes the user think the download is broken.
I'm going to create a fix for this issue, but was hoping that I could get some feedback @kesha-antonov
I had a couple ideas:
add a variable to control the max time between progress updates. If that time has elapsed and we haven't had a progress callback, then make the callback (was thinking I'd put this at ~10 seconds).
change the progress callback to not use percentage of file, but to also use some minimum size as well.. So for example, trigger the callback if > 1% of the progress has changed, OR there has been more than 1MB downloaded since last progress report
Any suggestions? Or other ideas? Would like to hear your ideas.
thanks,
Sam
The text was updated successfully, but these errors were encountered:
Is this a bug report, a feature request, or a question?
bug report / question
We've had an issue where some users are telling us download aren't working. Some of the downloads in our app are quite large (> 1 GB). I looked into it, and it looks like it's caused by the progress callback not being triggered.
If you look at this code here:
react-native-background-downloader/ios/RNBackgroundDownloader.m
Line 454 in ffca4f8
You will see a progress callback is only made if at least 1% of the progress has changed. But, for huge files, for example 1GB, that 1% is 10 megabytes. If a user is on a slow connection, that means they can be going 30 seconds+ without any sort of progress callback, which makes the user think the download is broken.
I'm going to create a fix for this issue, but was hoping that I could get some feedback @kesha-antonov
I had a couple ideas:
Any suggestions? Or other ideas? Would like to hear your ideas.
thanks,
Sam
The text was updated successfully, but these errors were encountered: