创建图像文件时,Cordova camrera插件响应未正确保存

时间:2016-12-05 08:30:52

标签: angularjs cordova android-camera cordova-plugins

我正在使用cordova camera plugin data_uri选项从我的应用程序中拍照并保存。在服务器端,我得到了base64编码字符串中的图像。但是保存了损坏的图像。但是我直接使用了base64编码的字符串,它在服务器端正确保存。

$image_code = $_REQUEST['imageCode']; $file = uniqid() . '.jpg'; $success = file_put_contents($file, base64_decode($image_code)); echo "uploaded";

如果我的实施有任何问题。感谢

0 个答案:

没有答案