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

此生再无相见时 提交于 2019-12-24 18:23:30

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/51627824/ion-input-type-file-only-work-on-ios-not-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!