如何在上传图像文件时禁用捕捉功能(在ipad上使用safari) [英] how to disable capture when upload image file (using safari on ipad)

查看:158
本文介绍了如何在上传图像文件时禁用捕捉功能(在ipad上使用safari)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用ipad
上的safari上传图片,这里是我的html代码

 < input type =fileaccept =image / *> 

当我尝试选择文件时,safari会提示我选择拍照或选择存在文件,我如何禁用拍照选项,并选择一个现有的文件?



我也查阅w3c文件,并尝试下面的代码,但不work

 < input type =fileaccept =image / *capture =filesystem> 


解决方案

据此 HTML5兼容性比较器,Safari仅支持部分媒体捕获功能:它符合接受属性,但忽略 catpure 属性。



因此,恐怕您必须等待Safari提供更好的支持才能使用你想要的方式...



更重要的是,根据 W3C规范

lockquote

捕获属性被指定,用户代理 应该 调用特定捕获控制类型的文件选择器。


关键字SHOULD 意味着Safari可以选择不遵循该建议出于某种原因,仍然声称符合标准......


I would like to upload a image using safari on ipad here is my html code

<input type="file" accept="image/*">

When i try to select a file, safari prompt me to choose "take photo" or "select existed file", how can i disable the "take photo" options, and just select an existing file?

I also look up w3c document, and try codes below, but not work

<input type="file" accept="image/*" capture="filesystem">

解决方案

According to this HTML5 compatibility comparator, Safari supports only partially the media capture feature: it complies with the accept attribute but ignores the catpure attribute.

So I am afraid you will have to wait for a better support from Safari before it works the way you want...

What's more, according to the W3C specifications:

When the capture attribute is specified, the user agent SHOULD invoke a file picker of the specific capture control type.

The keyword SHOULD means that Safari can choose not to follow the recommendation for some reason and still claim to be compliant with the standard...

这篇关于如何在上传图像文件时禁用捕捉功能(在ipad上使用safari)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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