document preview working

This commit is contained in:
Equilibrium ITO
2024-03-11 13:21:44 +01:00
parent 5c9330254e
commit c49cd411e3
2 changed files with 8 additions and 5 deletions
+3
View File
@@ -448,6 +448,8 @@ export class MessageService {
let downloadFile = "";
this.AttachmentsService.downloadFile(this.file.guid).subscribe(async (event) => {
console.log('download file',event)
if (event.type === HttpEventType.DownloadProgress) {
} else if (event.type === HttpEventType.Response) {
@@ -456,6 +458,7 @@ export class MessageService {
} else if (this.file.type != "application/img") {
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
console.log('downloaded file', downloadFile)
}