\n";
$file = $_POST['file'];
//$name = md5(rand().time()."DuSelPourRenforcerMonHash").'.jpg';
// Encode it correctly
$encodedData = str_replace(' ','+',$file);
$decodedData = base64_decode($encodedData);
// Finally, save the image
file_put_contents($CheminFichier, $decodedData) ;
echo "Ok";
?>