ion-input类型文件仅适用于ios,不适用于android [英] ion-input type file only work on ios, not on android

查看:69
本文介绍了ion-input类型文件仅适用于ios,不适用于android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的代码 <ion-input type="file" accept=".pdf,.doc,.docx" [(ngModel)]="data.files"></ion-input>

并且我在ios上尝试可以选择文件,但是为什么不能在android上工作呢?在android上没有错误,只是当我单击按钮时,视图有时向下滚动并向下滚动之前返回到上一个视图

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

推荐答案

输入类型=文件在移动设备上不起作用.这是参考

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

您可以使用cordova插件,例如fileChooser,FilePicker-Phonegap-iOS-Plugin.

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

这篇关于ion-input类型文件仅适用于ios,不适用于android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆