mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
send every type of file its possible now
This commit is contained in:
@@ -233,15 +233,17 @@ export class MessageService {
|
||||
} else if (event.type === HttpEventType.Response) {
|
||||
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/pdf') {
|
||||
} else if (this.file.type != "application/img") {
|
||||
|
||||
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
|
||||
console.log(downloadFile)
|
||||
} else if (this.file.type == 'application/audio') {
|
||||
} /* else if (this.file.type == 'application/audio') {
|
||||
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
|
||||
} else if (this.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
||||
downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
|
||||
}
|
||||
} */
|
||||
|
||||
console.log('Download file ',downloadFile )
|
||||
|
||||
this.attachments[0] = {
|
||||
image_url: downloadFile,
|
||||
|
||||
Reference in New Issue
Block a user