0
Next I’m able to generate a string in base 64 but I can’t send it to my server, follow the code:
$scope.cadastraFoto = function(){
var input = document.getElementById('fotoPerfil').files[0]
var reader = new FileReader()
reader.readAsDataURL(input)
console.log(reader)
var teste = reader.result
console.log(teste)
}
The result on the console looks like this :
Note that in the result there is a string that if I pick it up and play in an online converter my photo will be rendered. Now my big problem, because I can’t assign this string to a variable or send this object to my server ?