# How to download pdf file from amzon s3 bucket url

**URL:** <https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217>\
**Category:** ionic-v3\
**Created:** [December 13, 2018, 7:26am UTC](https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217 "2018-12-13T07:26:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajayverma601](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ajayverma601](https://forum.ionicframework.com/u/ajayverma601)\
**Post date:** [December 13, 2018, 7:26am UTC](https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217/1 "2018-12-13T07:26:28Z")

</div>

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](https://xyz-dev.s3.ap-south-1.amazonaws.com/27/2.pdf?X-Amz-%E2%80%A6c5ce)…

) 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

---

<div class="post-metadata">

**Author:** ![miloszornic](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@miloszornic](https://forum.ionicframework.com/u/miloszornic)\
**Post date:** [December 13, 2018, 2:49pm UTC](https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217/2 "2018-12-13T14:49:25Z")

</div>

in ionic v3 you can use

> ```auto
> Storage.get('...', {download: true}) 
> 
> ```

you will receive array of bytes that represent the image. Then object will need to be decoded.

```auto
  Storage.get('test.pdf', { download: true })
        .then(result => {
            console.log(Utf8ArrayToStr(result.Body));
        })
        .catch(err => {
            console.log('error axios');
            console.log(err)
        });

```

---

<div class="post-metadata">

**Author:** ![ajayverma601](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ajayverma601](https://forum.ionicframework.com/u/ajayverma601)\
**Post date:** [December 13, 2018, 2:56pm UTC](https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217/3 "2018-12-13T14:56:23Z")

</div>

Thanks for reply .I will try this

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:03pm UTC](https://forum.ionicframework.com/t/how-to-download-pdf-file-from-amzon-s3-bucket-url/150217/4 "2021-07-19T21:03:51Z")

</div>

Closed on July 19, 2021, 9:03pm UTC


