some changes

This commit is contained in:
Equilibrium ITO
2024-03-12 16:45:08 +01:00
parent 689a6299cc
commit 5b7224dbd6
3 changed files with 79 additions and 44 deletions
+4 -1
View File
@@ -456,9 +456,12 @@ export class MessageService {
if (this.file.type == "application/img") {
downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
} else if (this.file.type != "application/img") {
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
/*
let */
/* downloadFile = btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '')); */
console.log('downloaded file', downloadFile)
console.log('event body downloaded file', event.body)
}