Skip to content

Commit

Permalink
fix crash problem when load from base64 #58
Browse files Browse the repository at this point in the history
  • Loading branch information
Wonday committed Oct 5, 2017
1 parent 7eb522f commit 5404f8b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ export default class Pdf extends Component {
let data = uri.replace(/data:application\/pdf;base64\,/i, '')
RNFetchBlob.fs
.writeFile(cacheFile, data, 'base64')
// listen to download progress event
.progress((received, total) => {
//__DEV__ && console.log('progress', received / total);
this.props.onLoadProgress &&
this.props.onLoadProgress(received / total)
this.setState({ progress: received / total })
})
.then(() => {
//__DEV__ && console.log("write base64 to file:" + cacheFile);
this.setState({ path: cacheFile, isDownloaded: true })
Expand Down

0 comments on commit 5404f8b

Please sign in to comment.