send all file

This commit is contained in:
Peter Maquiran
2024-08-15 14:29:11 +01:00
parent bf50c923d1
commit 2aae4da3cd
9 changed files with 123 additions and 63 deletions
@@ -56,7 +56,7 @@
</div>
<div *ngFor="let attachment of message.attachments; let i = index">
<div *ngIf="attachment.fileType == 1">
<div *ngIf="attachment.source == MessageAttachmentFileSource.Webtrix">
<ion-icon src="assets/icon/webtrix.svg" class="file-icon font-25"></ion-icon>
<ion-label>{{ attachment.fileName}}</ion-label>
@@ -66,10 +66,33 @@
</div>
<div *ngIf="attachment.fileType == 2">
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Image">
<img [src]="attachment.safeFile">
</div>
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Audio">
<audio controls>
<source [src]="attachment.safeFile" >
Your browser does not support the audio element.
</audio>
</div>
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Doc">
<fa-icon *ngIf="attachment.mimeType == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="attachment.mimeType == 'application/word'" icon="file-word" class="word-icon">
</fa-icon>
<fa-icon *ngIf="attachment.mimeType == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" icon="file-word" class="word-icon"></fa-icon>
<fa-icon
*ngIf="attachment.mimeType == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
icon="file-word" class="excel-icon"></fa-icon>
<ion-icon *ngIf="attachment.mimeType == 'application/webtrix'" src="assets/icon/webtrix.svg">
</ion-icon>
<ion-icon *ngIf="attachment.mimeType == 'application/meeting'" src="assets/icon/webtrix.svg">
</ion-icon>
<ion-label>{{ attachment.fileName}}</ion-label>
</div>
</div>
</div>
@@ -137,6 +137,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
messageSendSubject: Subscription
messages1: {[key: string]: MessageEntity[]} = {}
MessageAttachmentFileType = MessageAttachmentFileType
MessageAttachmentFileSource = MessageAttachmentSource
constructor(
public popoverController: PopoverController,
@@ -875,7 +877,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
message.attachments = [{
fileName: res.data.selected.Assunto,
source: MessageAttachmentSource.Webtrix,
source: MessageAttachmentSource.Device,
fileType: MessageAttachmentFileType.Doc,
applicationId: res.data.selected.ApplicationType,
docId: res.data.selected.Id,
@@ -927,7 +929,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
message.attachments = [{
file: file.value.base64String,
file: file.value.base64String.split(',')[1],
fileName: "foto",
source: MessageAttachmentSource.Device,
fileType: MessageAttachmentFileType.Image,
@@ -984,7 +986,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
message.attachments = [{
file: fileBase64.value,
file: fileBase64.value.split(',')[1],
fileName: file.value.name,
source: MessageAttachmentSource.Device,
fileType: MessageAttachmentFileType.Doc,