Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Parallel downloads in IOS are broken #263

Closed
francisco-sanchez-molina opened this issue Feb 13, 2017 · 3 comments
Closed

Parallel downloads in IOS are broken #263

francisco-sanchez-molina opened this issue Feb 13, 2017 · 3 comments

Comments

@francisco-sanchez-molina
Copy link
Contributor

francisco-sanchez-molina commented Feb 13, 2017

When I launch multiple downloads, the promises are mixed. Especially when some downloads return 404. Example code:

download(url) {
RNFetchBlob
  .config({
    timeout: 7000,
    path: destination
  })
  .fetch('GET', url, this._getHeaders())
  .then(resp => {
    if (url !== resp.info().redirects[0]) {
      console.warn('bug!')
    })
}

['url1', 'url2', 'notFoundUrl3'].forEach(url => download(url))

Thanks

RN 0.41.2
RNFB all versions

@wkh237
Copy link
Owner

wkh237 commented Feb 14, 2017

@francisco-sanchez-molina , thanks for reporting this issue. I can replicate it on my end.

wkh237 added a commit that referenced this issue Feb 14, 2017
@wkh237 wkh237 added the beta label Feb 14, 2017
@wkh237
Copy link
Owner

wkh237 commented Feb 14, 2017

@francisco-sanchez-molina, I've applied a fix t to this issue, please upgrade your package from our archive repo and help verify it, thanks 👍

$ npm install --save wkh237/react-native-fetch-blob-package#0.10.3-fix-263

@francisco-sanchez-molina
Copy link
Contributor Author

francisco-sanchez-molina commented Feb 14, 2017

Thanks a lot! I checked the fix, and now it works like a charm!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants