You cannot click on a file entry in iOS. A workaround is to use css to set the opacity of the input element to 0 and place it only on top of the button. Thus, the input to the file will not be displayed, but when the button is pressed, it will be pressed.
<ion-item> <label>{{label}}</label> <input type="file" (change)="fileUpload($event)" id="file-input" style="opacity: 0" #fileInp> <button ion-button (click)="onClick()">Upload</button> </ion-item>
and then in the .scss file:
#file-input { opacity: 0; position: absolute; top: 0; width: 100%; height: 100%; left: 0; z-index: 999; }
There may be some other ways to fix this problem, but the way I did in the application I worked on in the past.
source share