Upload a File and Read Data with FileReader in Angular 2
Do it like this:
myReader.onloadend = (e) => {
console.log(myReader.result);
this.fileString = myReader.result as string;
};
So you can access your variables.
For a more detailed explanation: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Functions/Arrow_functions