Next I'm getting a base 64 string but I can not get it to send to my server, it follows 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:
Please note that there is no string in the result that if I take it and play in an online converter my photo will be rendered. Now my big problem, why can not I assign this string to a variable or send that object to my server?