mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix
This commit is contained in:
@@ -510,10 +510,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
"image_url": capturedImage
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title": capturedImageTitle ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
//"image_url": this.capturedImage,
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -635,18 +634,20 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
"image_url": imageData
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title": file.name ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
"type": "application/img",
|
||||
"guid": '',
|
||||
"image_url": imageData
|
||||
}]
|
||||
})
|
||||
|
||||
let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise()
|
||||
message.file.guid = guid.path
|
||||
|
||||
updateMessage({
|
||||
file: {
|
||||
type: "application/img",
|
||||
guid: guid.path,
|
||||
image_url: imageData
|
||||
}
|
||||
})
|
||||
|
||||
this.AttachmentsService.downloadFile(guid.path).subscribe(async (event) => {
|
||||
|
||||
@@ -656,23 +657,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
} else if (event.type === HttpEventType.Response) {
|
||||
var fileImage = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||
console.log('add picture to chat',fileImage);
|
||||
|
||||
updateMessage({
|
||||
file: {
|
||||
type: "application/img",
|
||||
guid: guid.path,
|
||||
image_url: fileImage
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title_link_download": false,
|
||||
"type": "application/img",
|
||||
guid: guid.path,
|
||||
"image_url": fileImage
|
||||
}]
|
||||
})
|
||||
|
||||
await this.storage.set(guid.path, fileImage).then(() => {
|
||||
console.log('add picture to chat IMAGE SAVED')
|
||||
message.getFileFromDb()
|
||||
|
||||
@@ -533,10 +533,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
"image_url": capturedImage
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title": capturedImageTitle ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
//"image_url": this.capturedImage,
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -658,9 +657,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
"image_url": imageData
|
||||
},
|
||||
attachments: [{
|
||||
"title": file.name,
|
||||
"title": file.name ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
"image_url": imageData,
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
@@ -681,10 +681,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
"image_url": capturedImage
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title": capturedImageTitle ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
//"image_url": this.capturedImage,
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -806,10 +805,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
"image_url": imageData
|
||||
},
|
||||
attachments: [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title": file.name ,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
//"image_url": this.capturedImage,
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user