Send file to LakeFs mobile done!

This commit is contained in:
Eudes Inácio
2022-03-27 18:54:08 +01:00
parent edc237124b
commit fa062c2cf5
7 changed files with 174 additions and 81 deletions
@@ -75,7 +75,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
scrollToBottomBtn = false;
longPressActive = false;
frameUrl: any;
downloadFile: any;
downloadFile: string;
massages: MessageService[] = []
showAvatar = true
@@ -750,8 +750,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
} else if (msg.file.type === 'application/pdf') {
this.downloadFile = 'data:application/pdf;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));;
console.log(this._arrayBufferToBase64(event.body))
this.downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
//console.log(this._arrayBufferToBase64(event.body))
console.log(eval(this.downloadFile))
}
msg.attachments[0] = {