My json object that I plan to post is something like below
export class MyPayload{
Customer: string;
SalesTotal: number;
...deleted whole bunch of other stuff and finally
salesForcastCsvfile: blob; // ?? I want to insert file serialized here to send to asp.net core api via a post
}
I know how to upload just the file direct as explained here But iam struggling to get the file into memory and serialize and insert in my json payload. Please advise how to do. Could not find any online tutorial for this.