mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
merge
This commit is contained in:
@@ -446,6 +446,8 @@ export class MessageService {
|
||||
|
||||
this.downloadLoader = true;
|
||||
let downloadFile = "";
|
||||
let downloadUrl = "";
|
||||
|
||||
this.AttachmentsService.downloadFile(this.file.guid).subscribe(async (event) => {
|
||||
|
||||
console.log('download file',event)
|
||||
@@ -456,10 +458,10 @@ 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 = event.url
|
||||
/*
|
||||
let */
|
||||
/* downloadFile = btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '')); */
|
||||
|
||||
|
||||
downloadFile = btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||
downloadUrl = event.url
|
||||
console.log('downloaded file', downloadFile)
|
||||
console.log('event body downloaded file', event.url)
|
||||
|
||||
@@ -471,7 +473,8 @@ export class MessageService {
|
||||
title: this.attachments[0].title,
|
||||
title_link: downloadFile,
|
||||
title_link_download: this.attachments[0].title_link_download,
|
||||
ts: this.attachments[0].ts
|
||||
ts: this.attachments[0].ts,
|
||||
attachmentsUrl: downloadUrl
|
||||
}
|
||||
|
||||
// save the changes to the storage
|
||||
|
||||
Reference in New Issue
Block a user