# Select a PDF file from input type file in IOS

**URL:** <https://forum.ionicframework.com/t/select-a-pdf-file-from-input-type-file-in-ios/113567>\
**Category:** ionic-v3\
**Created:** [November 27, 2017, 4:57pm UTC](https://forum.ionicframework.com/t/select-a-pdf-file-from-input-type-file-in-ios/113567 "2017-11-27T16:57:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandanshan](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@nandanshan](https://forum.ionicframework.com/u/nandanshan)\
**Post date:** [November 27, 2017, 4:57pm UTC](https://forum.ionicframework.com/t/select-a-pdf-file-from-input-type-file-in-ios/113567/1 "2017-11-27T16:57:23Z")

</div>

Hi all,

I’m trying to select a PDF file from the device and upload the file to S3.  
to select the file i’m using the input tag with type as file.  
my requirement is, i have an action sheet and on clicking on an option from the action sheet, i need to open the file choose window from the code. for this i’m using the following code

```auto
<input type="file" accept="application/pdf" (change)="showPDF($event);" [style.display]="'none'" #fileInput>

@ViewChild('fileInput') public fileInput: ElementRef;

 private uploadPDF() {  
    this.fileInput.nativeElement.click();
  }

```

The following code works in Android but doesn’t work in IOS (in IOs, in some devices it works, but not all the time the popup to browse of choose from icloud shows up)

i’m clearing the input before calling the click handler  
`this.fileInput.nativeElement.value = null;`

is there any other way to do 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, 10:02pm UTC](https://forum.ionicframework.com/t/select-a-pdf-file-from-input-type-file-in-ios/113567/2 "2021-07-19T22:02:06Z")

</div>


