从Web应用程序打开相机实例 [英] Opening Camera Instance from a Web App

查看:152
本文介绍了从Web应用程序打开相机实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Web App打开Camera实例?

Is it possible to open Camera instance from Web App?

我有一个Web App。显示某些内容,我希望用户能够拍摄照片并将其发送到

I have a Web App. displays something, and I want the user to be able to Take a picture and send it to the

服务器。如何实现这一点?

server. How can I achieve this?

推荐答案

如果你想直接访问WebApp, c $ c>文件表单的输入类型。

If you're looking to go straight WebApp, you might want to look into the File input type for forms.

具体来说,在iOS 6中,他们添加了从相机或图库提交图片的功能,只需使用< input type = file> 。然后,您可以设置要发送到服务器的表单,并接受传入的文件。

Specifically, in iOS 6, they added the ability to submit a picture from either the camera or the gallery using just a <input type="file"> within a form. You could then set the form to be sent to the server, and accept the incoming file.

这不仅需要构建应用程序,尝试通过任何批准过程等。它也是通常支持。根据此移动上的文件上传支持页面,支持在iOS 6+,Android 2.2+,BlackBerry 6+和Windows RT。

This has the added benefit of not needing to build an app, not needing to try to get it through any approval process, etc. It's also pretty commonly supported as well. According to this File Upload Support on Mobile page, it's supported in iOS 6+, Android 2.2+, BlackBerry 6+, and Windows RT.

这篇关于从Web应用程序打开相机实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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