HTML 文件上传在 Android 上不显示图库 [英] HTML File Upload Doesn't Show Gallery on Android

查看:31
本文介绍了HTML 文件上传在 Android 上不显示图库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的 PHP 应用接受从移动用户的图库中选择的照片.我正在使用 Chrome 在 Android 4.4.4 上进行测试.这是我的表格:

I'd like my PHP app to accept a photo chosen from a mobile user's gallery. I'm testing on Android 4.4.4 using Chrome. This is my form:

<form enctype="multipart/form-data" action="index.php" method="POST">
  <input type="hidden" name="MAX_FILE_SIZE" value="20000000" />
  <input type="submit" value="Add" />
</form>

我尝试了三种不同的 type="file" 输入,但都没有给我提供图库作为选项:

I've tried three different type="file" inputs and none of them give me the Gallery as an option:

  <input name="userfile" type="file" />

选项:相机、摄像机、录音机和文件

Options: Camera, Camcorder, Sound Recorder and Documents

  <input name="userfile" type="file" accept="images/*" />

选项:相机和文档

  <input name="userfile" type="file" accept="images/*" capture />

直接进入相机.

是否有一些直接的方法可以让 Gallery 作为一个选项出现,或者我是否使用 JavaScript 做一些迂回的事情?感谢您的回答.

Is there some straight-forward way to get Gallery to come up as an option or do I have do some round-about thing using JavaScript? Thanks for your answers.

推荐答案

尽量使用

代替.

它对我有用.

这篇关于HTML 文件上传在 Android 上不显示图库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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