How should I get image from canvas to CUploadedFile::getInstance? or is there any way how to save image from canvas in Yii?
I have this:
var canvas=document.getElementById("photoCanvas");
photoData=canvas.toDataURL();
and I am using Ajax to get photoData to php, I aslo know how to save it onve it's loaded in CUploadedFile::getInstance
$uploadedFile->saveAs(Yii::app()->basePath.'/../images/'.$fileName);
but what should be between these two codes? how should I save $_POST['photoData'] to $uploadedFile?
Simplified: How to get url image to CUploadedFile?