how to download pdf file into device from amazon s3 bucket url(like https://xyz-dev.s3.ap-south-1.amazonaws.com/27/2.pdf?X-Amz-…c5ce…
) in ionic 2
I have used filetransfer.download() method but not able to download anything just see the link is called again and again by the download method.Please help
in ionic v3 you can use
Storage.get('...', {download: true})
you will receive array of bytes that represent the image. Then object will need to be decoded.
Storage.get('test.pdf', { download: true })
.then(result => {
console.log(Utf8ArrayToStr(result.Body));
})
.catch(err => {
console.log('error axios');
console.log(err)
});
1 Like
Thanks for reply .I will try this