Open iphonic opened 2 years ago
Hi, Using library version 0.12.0. Facing two issues, both with downloading, issues are
Following is the code we trying, please point out mistake
var parameters={appver:"1",osver:"android",ver:"7",token:"sessiontoken"} var headers={"X-API-KEY":apikey,"X-USER-KEY":userkey,"Accept": 'multipart/form-data' } const dirs = RNFetchBlob.fs.dirs const downloadpath=`${dirs.DocumentDir}/${filename}` RNFetchBlob.config({ path:downloadpath, fileCache:true, }) .fetch('POST',url,{ ...headers }, JSON.stringify(parameters) ) .progress((received,total)=>{ console.log("received ",received); console.log("TOTAL ",total); // <=========== Receiving -1 always console.log('progress', received / total) }) .then((res)=>{ console.log(res); }) .catch((err)=>{ console.log(err); })
Thanks for Help.
same issues rn-fetch-blob: "0.13.0-beta-1"
total is -1, either because your url is incorrect or because the file isn't currently available.
Hi, Using library version 0.12.0. Facing two issues, both with downloading, issues are
Following is the code we trying, please point out mistake
Thanks for Help.