I'm trying to send a blob to my server, but it wont work. I'm using the doctemplater library which creates a Blob. This blob is correct because I'm able to save to local file (with saveAs(...)). But now I need to transfer this file to my server too.
let out = doc.getZip().generate({
type: 'blob',
mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
});
So I'm trying
const data = {
name: "test,
content: out
}
this.http.post<any[]>(this.path, data).pipe(
catchError((err: HttpErrorResponse) => {
// ...
})
);
The problem is that data['out'] is always empty on server side. So how can I send a blob to the server?
data['out']is empty?