移动Safari多个相机上传 [英] Mobile Safari Multiple Upload with Camera
问题描述
这是关于iOS6处理< input type =file/>
。
当你询问一个文件时:
< input type =fileaccept =image / *,video / * >
- http://jsfiddle.net/CJSU6/1/
- https://www.dropbox.com/s/d18kcin8eyypjd3/2013-03-13%2010.40.22.png
但是当你询问多个文件时,用户直接被发送到图库
< input type =fileaccept =image / *,video / *multiple =multiple>
- http://jsfiddle.net/CJSU6/0/
- https://www.dropbox.com/s/b3uugzweoeqbtlc/2013-03-13%2010.39.58.png
如果您要求多个文件,是否无法访问相机?
当你关注
< input type =file/>>时, code>在iOS 9中,用户可以选择是否拍照或从照片库中选择一张照片。即使在指定
多个
属性时,此功能也是一致的。
谢谢巫毒为请注意!
多重选择上传时,因为iOS设计为允许选择多张图片或拍摄一张图片并选择它 。
历史上,拍照选项一直允许用户将临时图片存储到存储器中,并将该单张图片提供给应用程序,而不允许选择额外保存的图片。实际上,当场拍摄的临时照片是不是保存到相机胶卷。
使用HTML的唯一方法是指示用户提前拍摄多张照片,然后然后完全上传。
您可以在消息中看到类似的情况短信)应用程序,在那里你有相同的选择。选择拍摄照片,可以让你拍摄一张照片,立即发送。它是一个应用程序的事实,使您可以继续按下图片按钮添加。但是,对于HTML输入字段则不是这样。
PS。我记得早在iOS 4的情况下。
作为最后的手段,您可以创建自己的简单的iOS应用程序,允许用户选择图片,或同时进行上传。
This is regarding iOS6's ability to handle
<input type="file" />
.When you ask for a single file:
<input type="file" accept="image/*,video/*">
But when you ask for multiple files, the user is directly sent to the gallery
<input type="file" accept="image/*,video/*" multiple="multiple">
Is there no way to access the camera if you ask for multiple files?
解决方案iOS 9+ Update: When focusing an
<input type="file" />
in iOS 9, the user is allowed to choose whether to take a picture or choose a picture from the Photo library. This functionality is consistent even when specifying themultiple
attribute.
Thanks Voodoo for the heads up comment!
The reason that the camera is not available on multiselect uploads is because iOS is designed to allow "selecting multiple pictures" or "take one picture and select it".
Historically, the "Take picture" choice has always allowed the user to take a temporary picture to memory, and that single picture is provided to the application, without permitting selecting additional saved pictures. In fact, that temporary picture taken on the spot is not saved to the Camera Roll.
The only way around that when using HTML is to instruct the user to take multiple pictures ahead of time, and then upload them altogether.
You can see a similar situation in the Messages (former SMS) App, where you are given the same choices. Selecting to take a picture, will let you take one and that one is immediately placed to be sent. The fact that it is an App allows you to keep on adding by subsequently pressing the picture button. This, however, isn't the case for HTML input fields.
PS. I recall this being the case as far back as iOS 4.
As a last resort, you could create your own "simple" iOS App that allows the user to either select pictures, or take and upload simultaneously.
这篇关于移动Safari多个相机上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!