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

问题描述

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

Is it possible to open Camera instance from 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,您可能需要查看表单的 File 输入类型.

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

具体来说,在 iOS 6 中,他们添加了仅使用表单中的 即可从相机或图库提交图片的功能.然后,您可以将表单设置为发送到服务器,并接受传入的文件.

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 应用程序打开相机实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 23:54