I am trying to read a file with in JavaScript with the File APIs.
I have the following code
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
var fileBlobs = [];
var reader = new FileReader();
for (var i = 0, f; f = files[i]; i++) {
fileBlobs.push(reader.readAsBinaryString(f));
console.log(reader)
}
}
It logs me this object
FileReader {onloadend: null, onerror: null, onabort: null, onload: null, onprogress: null…}
error: null
onabort: null
onerror: null
onload: null
onloadend: null
onloadstart: null
onprogress: null
readyState: 2
result: "lat, lng, popup↵13.47262306516617336, 52.47896324136591062, 55↵13.40861762468653673, 52.54336741663770027, 44↵13.29255442595013115, 52.51117712705399754, 33↵13.38642907198692988, 52.44880630287082113, 22"
__proto__: FileReader
How can I access only the result part?