typescript - 在手机浏览器中上传仅打开相机的antd
问题描述
我在这里使用 antd,有没有什么方法
可以在移动浏览器上访问时将capture="user"
这种代码用于打开相机?<input type="file" id="imageFile" capture="user" accept="image/*">
这是我的代码
<Upload
name="avatar"
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
beforeUpload={beforeUpload}
accept="image/x-png,image/jpeg"
onChange={(fileList) => handleChange(dispatch, fileList)}
disabled={isDisableField("selfie_image", navigation.data, "selfie")}
>
解决方案
推荐阅读
- google-cloud-platform - Flink PubsubIO 错误“Cannot nackAll on persisting checkpoint”
- elasticsearch - 过滤 DSL 查询搜索 - Elasticsearch
- firebase - 使用 Firebase 函数的条带化错误:错误:您没有提供 API 密钥。您需要在 Authorization 标头中提供您的 API 密钥
- node.js - 如何使用 UTC,同时使用 prisma.js 和 express.js 项目中的一般定义模型
- r - 来自 R 中 cenGAM tobit1 家族的模型预测超出左右阈值
- google-analytics - 允许贡献者将 Google Analytics 添加到 wiki 页面
- google-apps-script - Google App Script:如何获得 GmailApp 的许可?
- sql - 用于动态查找表、DB2 或 SQL Server 的紧凑 CTE 语法
- sql - 来自现场和 AWS 使用 dacpac-table 的 SQL 复制错误受变更数据捕获控制,无法修改
- java - 用实心圆圈替换按钮?