Skip to content
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.

RNFetchBlob failed to encode response data to BASE64 string. #334

Closed
@IceNeoMax

Description

@IceNeoMax

I'm downloading a pdf file and then i use cancel to stop downloading and that error appear.
Here's my code
downloadPdf = (data) => {
downloading = RNFetchBlob.fetch('GET', basePdf+data.pdf , {
//some headers ..
//basePdf+data.pdf
});
RNFetchBlob.config({
fileCache : true,
path : RNFetchBlob.fs.dirs.DocumentDir + '/' +data.pdf
});
downloading.progress((received, total) => {
let width= (received/total);
this.setState({ width:width});
})
.then((res) => {
this.setState({dataPdf: {year:data.year, pdf:data.pdf ,stored:res.path(),width:1} });
});
});
downloading.cancel();

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions