Need server part to save image sent from ajax

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


type: "POST",

contentType: false,

cache: false,

processData: false,

async: false,

url: "/upload",

data: {

imgBase64: dataURL


}).done(function(o) {

[url removed, login to view]('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.


[url removed, login to view]


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

Skills: AJAX, Javascript, PHP, Python, Software Architecture

See more: i have a still image with a design i need you to draw it in vector form with correct alignment so we can print it on t-shirt, java sql server save image table, sql server save image, php, mysql, ajax, jquery, save image sql server 2000, save image sql server, save image sql server table using java, coldfusion cffile save image server, save image using java sql server 2005, save image sql server table, save image sql server java, save image table sql server 2005 using parameter, save image sql server 2005, upload image within form php ajax help, sql server 2005 image save, save image using url sql server 2005, sql server 2000 sql save image

About the Employer:
( 1 review ) riverside, United States

Project ID: #15462139

Awarded to:


A proposal has not yet been provided

$25 USD in 1 day
(1 Review)

14 freelancers are bidding on average $26 for this job


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 Djang More

$25 USD in 1 day
(61 Reviews)

I can do it within one day

$55 USD in 1 day
(38 Reviews)

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 More

$25 USD in 1 day
(36 Reviews)

Very new to freelancer but have huge experience in python so It would be a pleasure to work for you. Relevant Skills and Experience Skills Programming: (9+ years) Cloud Computing: (3+ years) Web development: (6+ years More

$25 USD in 1 day
(4 Reviews)

A proposal has not yet been provided

$20 USD in 2 days
(16 Reviews)

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.

$12 USD in 3 days
(5 Reviews)
$30 USD in 1 day
(1 Review)

A proposal has not yet been provided

$25 USD in 3 days
(0 Reviews)
$25 USD in 0 days
(0 Reviews)

A proposal has not yet been provided

$25 USD in 1 day
(0 Reviews)

A proposal has not yet been provided

$25 USD in 1 day
(0 Reviews)

A proposal has not yet been provided

$25 USD in 1 day
(0 Reviews)
$25 USD in 1 day
(0 Reviews)