react-native-fetch-blob icon indicating copy to clipboard operation
react-native-fetch-blob copied to clipboard

RNFetchBlob error when sending request: timeout

Open Louies89 opened this issue 7 years ago • 2 comments

Hi , When I am trying to download file using below code:

RNFetchBlob.config({
  path: tmpPath
})
.fetch('GET', url, { Range: 'bytes=' + previousFileSize + '-' })
.then((resp) => {

  return this.appendFile(resp.path(), PicPath, 'nostats').then((stats1) => {  <<== This function appends data to the old file as it used for resumable download
  })
})
.then(() => {
  resolve({ path: 'file://' + PicPath });
})
.catch((e) => {
  resolve(false);
})

But when network is slow, the time out occurs. And it shows the error message in the application screen.

So i went through the code, it is from here

So my question is how to handle this error in code. And I thing all such exceptions should be handled in code.

@wkh237 Please help

Louies89 avatar May 03 '18 10:05 Louies89

please read the README and the issue with the excamation points. This package has moved:

https://github.com/joltup/react-native-fetch-blob

Post your issue there

schumannd avatar May 04 '18 08:05 schumannd

Ok Sorry.. I think there should be some option to restrict user to raise issues on some projects...

Louies89 avatar May 04 '18 18:05 Louies89