a lot of changes

This commit is contained in:
Eudes Inácio
2023-09-06 21:23:21 +01:00
parent 9de3019446
commit fb1bd07ad0
25 changed files with 1187 additions and 482 deletions
@@ -907,13 +907,26 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => {
console.error(error);
})));
const blob = this.fileService.base64toBlob(encodedData, file.type)
let blob;
let formData
let fileBase64
if (this.platform.is("tablet")) {
const fileBase64 = await this._getBase64(file)
blob = this.fileService.base64toBlob(encodedData, file.type)
console.log('BLOB BLOB', blob)
const formData = new FormData();
formData.append('blobFile', blob);
formData = new FormData();
formData.append('blobFile', blob);
/* console.log('add file', fileBase64) */
} else {
blob = this.fileService.base64toBlob(encodedData, file.type)
fileBase64 = await this._getBase64(file)
formData = new FormData();
formData.append('blobFile', blob);
}
this.ChatSystemService.getGroupRoom(roomId).send({
file: {