Eggy
Eggy

Reputation: 551

ion-input type file only work on ios, not on android

I have code like this <ion-input type="file" accept=".pdf,.doc,.docx" [(ngModel)]="data.files"></ion-input>

and I try on ios it's work can choose file, but why not work on android? on android not have error, just when I click the button, the view scrolling down for sometimes and back to pervious view before scrolling down

Upvotes: 0

Views: 1149

Answers (1)

Suresh Kumar Ariya
Suresh Kumar Ariya

Reputation: 9764

Input type=file won't work on mobile. Here is the reference https://forum.ionicframework.com/t/upload-file-with-input-type-file-but-get-it-with-file-path/100043/2

You can use cordova plugins like fileChooser, FilePicker-Phonegap-iOS-Plugin.

Upvotes: 1

Related Questions