mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -428,7 +428,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
deleteMessage(msgId: string, msg: MessageService) {
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
||||
if (msg.file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(msg.file);
|
||||
// this.openViewDocumentModal(msg.file);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -436,17 +436,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
str = str.substring(1, ((str.length) - 1));
|
||||
|
||||
const encodedData = btoa(str);
|
||||
/* let fullUrl;
|
||||
fullUrl = "https://gabinetedigitalchat.dyndns.info" + url;
|
||||
//fullUrl = "http://www.africau.edu/images/default/sample.pdf";
|
||||
|
||||
this.frameUrl = fullUrl; */
|
||||
let file = this.base64toBlob(encodedData, 'application/pdf')
|
||||
let fileURL = URL.createObjectURL(file)
|
||||
|
||||
window.open(fileURL);
|
||||
|
||||
// this.chatService.getDocumentDetails(fullUrl);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,9 +625,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
resultType: CameraResultType.Base64,
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
|
||||
//const imageData = await this.fileToBase64Service.convert(file)
|
||||
//
|
||||
|
||||
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
|
||||
const blob = await response.blob();
|
||||
@@ -780,13 +772,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const roomId = this.roomId
|
||||
|
||||
const file: any = await this.fileService.getFileFromDevice(types);
|
||||
|
||||
//if (file.type == "application/pdf") {
|
||||
|
||||
|
||||
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
|
||||
|
||||
}) */
|
||||
|
||||
|
||||
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
|
||||
|
||||
Reference in New Issue
Block a user