首页 > 解决方案 > 在手机浏览器中上传仅打开相机的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")}
  >

标签: typescriptmobilefile-uploadcameraantd

解决方案


推荐阅读