Adding CropperJS into a nodejs solution, and I'm trying to get the returned Base64 string back into file format. So I can send the file to the upload function.
I can't change any functionality and need to use file type to send as a parameter.
I tried: Creating a blob and passing it -> get an error can't to parse the file.
//this is used to upload the file
File.upload(file).then(function (savedFile) {
//with the new cropper i get back base64 string from:
$scope.imgSrc = $scope.cropperCrop.getCroppedCanvas().toDataURL();
How do I convert imgSrc to file to pass into the File upload function?