Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Send the drawn image to the server
- $('#sendBtn').live('click', function () {
- var cvs = $('#canvas');
- var image = cvs[0].toDataURL("image/png");
- image = image.replace('data:image/png;base64,', '');
- $.ajax({
- type: 'POST',
- url: '/webcam_demo/handle_image/',
- data: '{ "part_picture" : "' + image + '" }',
- contentType: 'application/json; charset=utf-8',
- dataType: 'json',
- success: function (msg) {
- alert('Image sent!');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement