I have to upload and read an excel file from UI and send the file data in binary form to a backend API.
I am using the File reader and reading the file as binary, like below, and passing the fileReader.result to my Node js controller for calling the API.
fileReader.readAsBinaryString(this.file);
At the backend this is throwing some error.When I am using fileReader.readAsArrayBuffer(this.file) ; I am not able to pass to the controller, since this is object, not a string.
How do I resolve this issue, I want to pass the data obtained from readAsArrayBuffer to the API.