Home  >  Q&A  >  body text

android - 安卓input file 支持拍照上传吗

<p class="am-form-group am-form-file">
<button type="button" class="am-btn am-btn-sm">
选择要上传的图片</button>
<input id="doc-form-file" type="file" accept="image/*" multiple>
</p>
<p id="file-list"></p>

如图是ios的微信浏览操作截图,但是在安卓端貌似只能访问相册,不支持拍照,有大牛给点意见吗

PHP中文网PHP中文网2719 days ago607

reply all(4)I'll reply

  • PHPz

    PHPz2017-04-17 14:30:36

    <input id="File2" runat="server" type="file" accept="image/*" capture="camera" style="width:100%" />

    Just use this.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 14:30:36

    No ~ you can only access the photo album, Apple can

    reply
    0
  • 黄舟

    黄舟2017-04-17 14:30:36

    Input file means using native. So what is this native thing? I call him a shell, various realizations. Native browsers, uc, chrome, browsers under WeChat, etc. are all shells. The implementation of specific shells varies.
    In other words, he can take pictures of you or not. You can't control it. Therefore, the shell is generally required to provide the corresponding API for web calls.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:30:36

    Just add capture="camera"

    reply
    0
  • Cancelreply