This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
TypeError when trying to download file #488
Open
Description
Hey everyone, I'm trying to get my app to download a file and open it with the default phone application, the simple fetch to get my file works however, as soon as i add this:
addAndroidDownloads : {
useDownloadManager : true
}
i get the following error : RNFetchBlob request error: TypeError: expected dynamic type 'string'
, but had type object'null
My code is below in case there's a mistake.
React Native version : 0.46.4
RN Fetch Blob version : 0.10.6
Snippet :
async _downloadFile () {
await RNFetchBlob.fetch('GET', Global.baseUrl+'/'+this.file.webPath , {
authorization : Global.appToken,
addAndroidDownloads : {
"useDownloadManager" : true
}
})
.then(async(res) => {
console.log('file downloaded');
})
.catch((err) => {
console.log('error DLL : ', err.message);
});
}
Thanks by advance, really nice library by the way it helped me a lot :)