Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function downloadFile(url, filename) {
- axios.get(url, { responseType: 'arraybuffer' }).then(res => {
- let data = btoa(new Uint8Array(res.data).reduce((data, byte) => data + String.fromCharCode(byte), ''))
- cep.fs.writeFile(filename, data, this.cep.encoding.Base64)
- })
- }
Add Comment
Please, Sign In to add comment