Created
October 3, 2019 07:03
-
-
Save trinadhkoya/d4a655e00a1f05af95a8b11a0a015608 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const doDownloadPDF = () => async dispatch => { | |
let filename_attachment = '1'; | |
let ext = '.pdf'; | |
let base64Str = res.base64(); | |
let pdfLocation = DocumentDir + '/' + filename_attachment + ext; | |
await RNFetchBlob.fs.writeFile(pdfLocation, base64Str, 'base64').then((res) => { | |
// eslint-disable-next-line no-console | |
console.log(res) | |
}, (err) => { | |
// eslint-disable-next-line no-console | |
console.log(err) | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment