I am using ionic to build a mobile app that incorporates a file upload.
Versions
- ionic (Ionic CLI) : 4.10.3
- Ionic Framework : ionic-angular 3.9.3
- @ionic/app-scripts : 3.2.3
The files supported are
- images
- word documents (.doc, .docx)
I am trying to use a HTML input tag with the attribute of type="file"
<input style="display:none;" type="file" accept="image/*, .pdf, .doc, .docx" (change)="fileSelected($event)" #chosenFile />
<button class="btnAttach" (click)="chosenFile.click()"><ion-icon class="attach" name="attach"></ion-icon></button>
This is working perfectly for images on android and ios but it does not allow me to select pdf or word documents. I can see them but they are greyed out.
Any help here would be appreciated.