From my php page I send file upload content as
$imgData = addslashes(file_get_contents($_FILES[\'userImage\'][\'tmp_name\'])); $imgData= base64_encode($imgData);