[英]jQuery, PHP - Take a picture with HTML5, save it into a canvas, get that canvas to an image and post it in a folder in the server
I guess the question will be enough, but here's some extra information. 我想这个问题就足够了,但是这里有一些额外的信息。
I want to take a picture using HTML5 API and save it into a Canvas. 我想使用HTML5 API拍照,然后将其保存到Canvas中。 Then, I want to take that picture and post it in the server in a folder.
然后,我想拍摄该照片并将其发布到服务器的文件夹中。 The application is that I'm adding a user to my system and I want to make a picture of him, and save it in the server for obvious reasons to use it in the future.
该应用程序是我要在系统中添加一个用户,并且要为其制作一张照片,并出于明显的原因将其保存在服务器中,以备将来使用。
I'm playing with some tutorials even here but nothing has been useful for me. 即使在这里,我也正在玩一些教程,但是对我没有任何帮助。
I already took the picture and save it in the Canvas. 我已经拍摄了照片并将其保存在画布中。 I just want to be able to get that content to the server.
我只希望能够将这些内容发送到服务器。
Canvas content can't be returned if the canvas has been tainted. 如果画布已被污染,则不能返回画布内容。
A canvas gets tainted when a resource is loaded from a origin that's not from your own domain. 当从非您自己的域的来源加载资源时,画布会被污染。 Local files from client is not from your domain.
来自客户端的本地文件不是来自您的域。 Hence the canvas gets tainted!
因此,画布会被弄脏!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.