This commit is contained in:
tiago.kayaya
2021-12-07 10:59:12 +01:00
parent b0c93ae348
commit 303e78f336
2 changed files with 10 additions and 8 deletions
@@ -245,14 +245,16 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
})
}
viewDocument(file:any, url?:string){
if(file.type == "application/img"){
console.log(file);
async viewDocument(msg:any, url?:string){
if(msg.file.type == "application/img"){
let response:any = await this.fileService.getFile(msg.file.guid).toPromise();
console.log(response);
//this.openPreview(msg);
//this.fileService.getFile().toPromise();
}
else if(file.type == "application/webtrix") {
this.openViewDocumentModal(file);
else if(msg.file.type == "application/webtrix") {
this.openViewDocumentModal(msg.file);
}
else{
let fullUrl;