我是 python 的新手,我使用 python 做了一个应用程序,因为我想使用 html 和 AJAX javascript 从我的网络摄像头捕获图像并将其保存到服务器端 python。我已经使用客户端 HTML 完成了图像的捕获,但我不知道如何将数据从 html 客户端保存和传递到服务器端 python。如果有人这样做,请你帮我...提前谢谢。 ..我的.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Get User Media - Photo</title>
</head>
<body>
<button id="take">Take a photo</button><br />
<video id="v"></video>
<canvas id="canvas" style="display:none;"></canvas>
<img src="D:/VoteTest/img.jpg" id="photo" alt="photo">
<script>
;(function(){
function userMedia(){
return navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia || null;
}
// Now we can use it
if( userMedia() ){
var videoPlaying = false;
var constraints = {
video: …Run Code Online (Sandbox Code Playgroud)