1
I am trying to read a binary (digital biometric) file that the user selects. But it is not returning anything.
What is wrong?
Follows code below:
var fileInput = document.getElementById('fileInput');
var file = fileInput.files[0];
var reader = new FileReader();
var campo = "";
reader.onload = function(e) {
campo = reader.result;
}
reader.readAsArrayBuffer(file);
document.getElementById('template').value = campo;
alert("CAMPO TAMANHO --> " + campo.length);
}
You have a
}
more in your code. That’s just like it or it was from copy/Paste?– Sergio