We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this.downloadTask .config({ fileCache : true, path : RNFetchBlob.fs.dirs.DocumentDir + `/yourApp/${fileUniqueId}.mp3` }) .fetch('GET', downloadURL, {}); this.downloadTask .progress({ interval : 100 }, (received, total) => { console.log('progress ' + Math.floor(received/total*100) + '%'); progressCb(Math.floor(received/total*100)) }) .then(async (res)=>{ console.log("then response",res); console.log('The file saved to ', res.path()); const filePath = 'file://' + res.path(); //save file path in AsyncStorage let saveList = {}; const downloadList = await AsyncStorage.getItem("@download"); if(downloadList) saveList = JSON.parse(downloadList); saveList[contentKey] = filePath; return AsyncStorage.setItem("@download",JSON.stringify(saveList)) }) .then(()=>{ finishCb(); }) .catch((err)=>{ //you must add this line. If you don't add, your app users waste they're storage RNFetchBlob.fs.unlink(RNFetchBlob.fs.dirs.DocumentDir + `/yourApp/${fileUniqueId}.mp3`); console.log(err) })
You can find solution in this PR(past repo), It works well for me wkh237#568
The text was updated successfully, but these errors were encountered:
Is the past repository's solution implemented here?
Sorry, something went wrong.
@BaderSerhan maybe not
Successfully merging a pull request may close this issue.
Nevertheless you cancel the download task, file is exist exactly in your app caches
Android side download task cancel is not working
You can find solution in this PR(past repo), It works well for me
wkh237#568
The text was updated successfully, but these errors were encountered: