0

I am unable to get full file path in component.ts file,

code from component.html,

     <input type="file"  (change)="handleFileInput($event)" class="form-control" formControlName="cv" > 

code from component.ts

 handleFileInput(event :any) {
    
    /*
    let files : FileList  = event.target.files;
    this.imageShow = files[0]; */ //this approach did not worked too

    if (event.target.files && event.target.files[0]) {
      var reader = new FileReader();
      reader.onload = (event: any) => {
          this.imageShow = event.target.result;
      }
      reader.readAsDataURL(event.target.files[0]);
  }

this.imageShow is giving some large string in base64 format  like this ,

can someone help to get actual full path so that I can make apicall with that path..

here is the version details,

0 Answers0