itinance / itinance/react-native-fs
How to download multiple files in order in the background.[ios]
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
I want to download multiple files in the order in the background as the following:
```
_finishDownload(result) {
.........
this._downloadTask();
}
async _downloadTask() {
cont newUrl = getNewUrl();
const options = {
fromUrl: newUrl,
toFile: dest,
background: true,
connectionTimeout: 1000 * 10,
progress: res => this._onProgress(res),
};
const { jobId, promise } = RNFS.downloadFile(options);
promise
.then(result => {
this._finishDownload(result);
})
.catch(error => {
console.error(error);
});
}
```
But I find RNFS cannot start a new download task when the current download task complete when the app becomes background.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.