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

Fetch with path always appends to file, doesn't overwrite #173

Closed
membla opened this issue Nov 3, 2016 · 3 comments
Closed

Fetch with path always appends to file, doesn't overwrite #173

membla opened this issue Nov 3, 2016 · 3 comments

Comments

@membla
Copy link

membla commented Nov 3, 2016

RNFB: 0.9.6
RN: 0.36.1

    RNFetchBlob
    .config({
      path : dirs.DocumentDir + '/assets.xml'
    })
    .fetch('GET', 'http://path/to/assets.xml', {
      //some headers ..
    })
    .progress((received, total) => {
      this.setState({appContainerSourceProgress: received/total})
    })
    .then((res) => {
      console.log('The file saved to ', res.path())
    })

If assets.xml exists, new data is appended to the file, not overwritten. Documentation and #141 suggests otherwise.

@wkh237
Copy link
Owner

wkh237 commented Nov 4, 2016

@membla , thanks for the information. I'll fix the problem 👍

wkh237 added a commit that referenced this issue Nov 4, 2016
wkh237 added a commit that referenced this issue Nov 4, 2016
@wkh237
Copy link
Owner

wkh237 commented Nov 4, 2016

@membla , a fix has launched in 0.10.0-beta.7 please upgrade to this version and try if it works.

@membla
Copy link
Author

membla commented Nov 4, 2016

@wkh237 Thank you, that seems to have solved it.

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