收藏
回答

小程序web-view中input type="file"部分文件格式(docx、pdf 等)不支持

框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 微信安卓客户端 8.0.28 2.25.4

bug表现

小程序web-view中,如下使用,部分文件格式(如docx、pdf、xlsx 等)不支持

<input type="file" accept=".doc, .docx, application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,  application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation,application/pdf,text/plain">


预期表现

打开本地文件夹之后,大部分常用文件类型均可支持

最后一次编辑于  2022-10-09
回答关注问题邀请回答
收藏

1 个回答

  • 清风
    清风
    2022-10-10

    解决方案:

    <input type="file" accept>


    2022-10-10
    有用 3
    回复 1
    • 清风
      清风
      2022-10-12
      accept 在企业微信中需要有属性值,否则文件都不支持上传了
      2022-10-12
      回复
登录 后发表内容