简体   繁体   English

如何在Laravel 5.5中从Webcam.js上传图像?

[英]How to upload image from Webcam.js in Laravel 5.5?

I have used Webcam.js in a basic example script. 我已经在基本示例脚本中使用了Webcam.js

When I click the 'capture' button it shows the image from webcam in <img src='data:image/jpeg64,........'> . 当我单击“捕获”按钮时,它在<img src='data:image/jpeg64,........'>显示来自摄像头的<img src='data:image/jpeg64,........'>

I need to upload the image from attribute src to my server. 我需要将图像从属性src上传到我的服务器。

Usually, I can upload files into server by <input name="file" type="file"> , but in this case I can not do it. 通常,我可以通过<input name="file" type="file">将文件上传到服务器,但是在这种情况下,我不能这样做。 Please help. 请帮忙。

Parse JSON and get all text in '..'. 解析JSON并获取“ ..”中的所有文本。 Then decode image from base64. 然后从base64解码图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM