springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 14:16:56
30
我正在尝试捕获多个图像并保存到我的Django数据库中,但我不知道如何捕获多个图像。我想动态添加新的画布为新的捕捉图像。
这是我的HTML和JS捕捉图像。
const player = document.getElementById('player');
const docs = document.getElementById('document')
const captureButton = document.getElementById('capture');
const constraints = {
video: true,
};
captureButton.addEventListener('click', (e) => {
const canvas = document.getElementById('canvas');
const context = canvas.getContext('2d');
context.drawImage(player, 0, 0, canvas.width, canvas.height);
const imgFormat = canvas.toDataURL();
docs.value = imgFormat
e.preventDefault();
});
navigator.mediaDevices.getUserMedia(constraints)
.then((stream) => {
player.srcObject = stream;
});
<!-- begin snippet: js hide: false console: true babel: false -->
<代码><;form action=“ ” method=“ post ” enctype=“ multipart/form-data ” dir=“ LTR ”>;{%csrf_标记%}<;输入type=“ text ” name=“ documents ” ID=“ document ”>;<;video ID=“ player ”控制自动播放>;<;/video>;<;button ID=“ Capture ”>;Capture<;/button>;<;canvas ID=“ canvas ” width=320 height=240>;<;/canvas>;<;button CLASS=“ HEADER PT-2 TEXT-WHITE PX-4 P-1 ROUNDED-LG MT-4 ”>;{%TRANS “ SAVE ”%}<;/button>;<;/窗体>;
我不确定这是否可能。如果你在这种情况下知道什么,请告诉我,我很感激你的帮助。
顺晟科技:
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11