Good morning,
I'm making an application in angular that picks up a drawing made in canvas and then upload it as a png image to the server.
This is my function:
$scope.signContract = function(){
var canvas = document.getElementById("pwCanvasMain");
var Sign = canvas.toDataURL("image/png");
ContractsFactory.Sign($scope.contratofirma._EntityId, Sign).success(function (data) {
}).error(function (error) {
swal("Algo ha ido mal", error.error, "error");
});
}
The fact is that in the POST request I am sending an image in base64 and in my server I need to process it as an image under "$ _FILE".
Is there a way to move base64 to an input file?