iOS Safari限制图像上传 [英] iOS Safari Restrict Image Upload
问题描述
我知道苹果提供了一些在HTML中使用的属性,以使您的网络应用程序在iOS上使用Safari更好。我想知道现在iOS 6支持使用文件输入进行媒体上传,如果你选择它,你会得到两个选项:
I know apple provide some attribues to use in HTML to make your web app work better with Safari on iOS. I was wondering now iOS 6 supports media uploading with the file inputs, at the moment if you select it you get two options:
"Take Photo or Video"
"Choose Existing"
我想知道我是否可以设置浏览器只显示拍照或视频?我知道在我想知道Apple是否给你这么大的控制权之前,我已经看过一些奇特的Safari选项?如果你们在这方面看到了什么,请告诉我。我想删除选择现有只是因为我想提供的功能。
I was wondering if I can set the browser to only show "Take Photo or Video"? I know I've seen some fancy Safari options before I was wondering if Apple gives you this much control? Let me know if you guys have seen anything on this. I would love to remove choose existing just because of the functionality I'd like to provide.
推荐答案
你可以禁用视频,以便选择仅在:
You can disable video so that the choice is only between:
"Take Photo"
"Choose Existing"
将/ *添加到html中的accept属性:
by adding /* to the accept attribute in your html:
<input type="file" accept="image/*" capture="camera" />
因此,至少可以在浏览器中进行自定义。如果我找到更多,我会更新。
Customizations are therefore possible, in the browser at least. I'll update if I find more.
这篇关于iOS Safari限制图像上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!