Ionic3 scope problem, how to pass the read data to the scoped variables in the onload event of FileReader ()?

I haven"t written much that ts, is also looking up angularjs while writing. What should I do to select a file at the front end and read it for base64,? My js level is still in the jquery era, please do not hesitate to comment

pseudo code:

import { Component } from "@angular/core";
@IonicPage()
@Component({
  selector: "test",
  templateUrl: "test.html",
})
export class TestPage {
  base64="";    // base64 
  constructor(
    public navCtrl: NavController,
    public navParams: NavParams
  ) {};
  
  readPicFile(){
    var file_ipt=document.getElementById("file_up");
    var file = file_ipt.files[0];
    var reader = new FileReader();
    reader.readAsDataURL(file);
    reader.onload = function (e) {
        base64 = this.result;    //
        // base64 
    }
  }
}
Mar.19,2021

two methods:

1.
readPicFile(){
  let that=this;
  ...
  reader.onload = function (e) {
       that.base64 = xxx;   
    }
  }

2.
readPicFile(){
  ...
  reader.onload = (e)=> {
       this.base64 = xxx;   
    }
  }
Menu