I captured the image from webcam and want to sent it to Flasks server. I have the ajax part to send image to flask. Now I do need back end part to handle this data uploaded to server. I have the similar PHP code that handle the ajax call, but I need the python code on server instead of PHP
ajax call
$.ajax({
type: "POST",
contentType: false,
cache: false,
processData: false,
async: false,
url: "/upload",
data: {
imgBase64: dataURL
}
}).done(function(o) {
[login to view URL]('saved');
// If you want the file to be visible in the browser
// - please modify the callback in javascript. All you
// need is to return the url to the file, you just saved
// and than put the image in your browser.
});
[login to view URL]
<?php
define('UPLOAD_DIR', 'images/');
$img = $_POST['imgBase64'];
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);
//send request to ocr
print $success ? $file : 'Unable to save the file.';
?>
Need server code similar to php above to handle data sent from ajax call
I am a python developer having 6 + experience in IT industry.
I am expert in:
Django and Flask and REST API application development
CSS, HTML5, Javascript, AJAX, JQuery, Bootstrap
Relevant Skills and Experience
Django and Flask and REST API application development
CSS, HTML5, Javascript, AJAX, JQuery, Bootstrap
Proposed Milestones
$25 USD - NA
Dear Sir,
i can do it perfectly
please reply
am expert in php,mysql,ajax etc
i can easlity save image to server. i wish to do this task
please reply to me
Relevant Skills and Experience
PHP,MYSQL,AJAX,JQUERY
Proposed Milestones
$25 USD - 1 HOUR
Hi I'm a professional Node.Js developer. this is an easy task for me. I'm new here, looking for reviews here. my job success rate is 100% pls consider me for this job.