admin管理员组

文章数量:1289509

I have a Django web application in which I want to give an option to capture the image in the registration form. So, whenever the user presses the capture image button then the camera on the client system should open to take the image, the image then would get stored in the server-side folder.

I am thinking that the camera should open from the HTML page and send the image to the server, but I am not able to open the camera using the HTML code.

Please advise me.

I have a Django web application in which I want to give an option to capture the image in the registration form. So, whenever the user presses the capture image button then the camera on the client system should open to take the image, the image then would get stored in the server-side folder.

I am thinking that the camera should open from the HTML page and send the image to the server, but I am not able to open the camera using the HTML code.

Please advise me.

Share Improve this question edited Feb 13, 2020 at 7:06 Rohit416 3,4963 gold badges26 silver badges42 bronze badges asked Dec 18, 2013 at 13:36 PSSRPSSR 4691 gold badge11 silver badges18 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

You can use WebRTC for this; html5rocks. has a nice tutorial, see especially the example of taking screenshots. To store the image on the server, you'll have to upload it via AJAX.

You have several options to access client webcam. The easiest way is HTML5. But you can use sveral tools in silverlight and flash plugin.

See how-to-access-webcam-from-html5 and html5-getusermedia-record-webcam-both-audio-and-video

After getting image in page you can send it to server in diffrent ways including JavaScript (with AJAX) or using HTML form element (like file input)

本文标签: javascriptWhy I can39t take image snapshot with clientside camera in Django web applicationStack Overflow