-1
I have a function that runs when uploading files, I would like to identify the type of this Encounter. I am using the code below.
async uploadFile(event) {
    var document;
    var reader = new FileReader();
    let file = event.target.files[0];
    reader.onload = ((file: any) => {
      return (e: any) => {
        document.description = e.srcElement.result;
        document.title = title;
        document.fileName = file.name;
      }
    })(file);
    reader.readAsText(file);
  }
Any idea ?
Thank you.