跨设备拍摄的照片上传 [英] Cross device photo capture for upload

查看:154
本文介绍了跨设备拍摄的照片上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于在iOS6的移动Safari浏览器用户已经能够无论是通过相机或自己的相簿上传从他们的设备的图像。

Since iOS6 Mobile Safari browser users of the have been able to upload images from their device either through the camera or their photo album.

Web开发人员只需编写约束的文件输入标签的上传脚本如下:

Web developers only had to write a upload script bound a file input tag as follows:

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

此将促使iOS用户选择图像源(图像文件或相机),然后该图像将被上传到服务器。事情是这样的形象。

This would prompt iOS users to select the image source (image file or camera) and then the image would be uploaded to the server. Something like in this image.

这可以很好地用于与移动Safari浏览器的iOS不过,我想在Windows Phone的这种相同的行为,Android版以及iOS的iPhone和iPad。

This works well for iOS with Mobile Safari however, I would like to have this same behavior in Windows Phone, Android as well iOS iPhone and iPad.

是否有类似的HTML规范为每个设备?

Are there similar HTML specifications for each device ?

您可以使用通过的链接://计算器.COM /用户/ 1313761 /克里斯 - droukas>克里斯Droukas对他的回答来试试吧。

You can use this link provided by Chris Droukas on his answer to try it.

感谢您。

编辑:

我已经尝试&LT的机会;输入类型=文件接受=图像/ *捕捉=相机&gt;在Android 4.2版和iOS6的和两个它允许用户拍摄照片(或选择一个)并提交。

I've had the chance to try <input type="file" accept="image/*" capture="camera"> on Android 4.2 and iOS6 and on both it allowed the user to take a picture (or select one) and submit it.

可以与更多的设备告诉我,这为他们工作?

Can with more devices tell me if this worked for them?

推荐答案

根据这个图表 HTML媒体捕获可在以下移动平台:

According to this chart, HTML Media Capture is available on the following mobile platforms:

iOS的Safari浏览器:6.0和更高版本

Android浏览器:3.0和更高

谷歌浏览器:4.0和更高

BlackBerry浏览器:BB10

的Opera Mobile(Android和放大器;塞班):14.0和更高

火狐(的Andr​​oid,MeeGo的):11.0及更高

它不会出现在Internet Explorer中支持在Windows Phone。您可以在不同的设备上测试这里

It does not appear to be supported in Internet Explorer on Windows Phone. You can test on different devices here.

这篇关于跨设备拍摄的照片上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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