This commit is contained in:
Chneemann 2024-06-13 05:09:33 +02:00
parent 500e7d27ee
commit 61d85f958d
3 changed files with 3 additions and 9 deletions

View file

@ -12,7 +12,7 @@
}"
(click)="showOverlay(filePath)"
/>
} @if (['pdf', 'doc', 'txt'].includes(getFileType(filePath))) {
} @if (['pdf', 'doc', 'docx'].includes(getFileType(filePath))) {
<a href="{{ filePath }}" target="_blank">
<img
class="otherFiles"
@ -25,7 +25,7 @@
: '5vw'
}"
/></a>
} @if (['mp3', 'wav', 'wma'].includes(getFileType(filePath))) {
} @if (['mp3', 'wav'].includes(getFileType(filePath))) {
<audio
controls
preload="auto"
@ -37,7 +37,7 @@
: ''
}"
></audio>
}@if (getFileType(filePath) === 'mp4') {
} @if (['mp4', 'wmv', 'avi'].includes(getFileType(filePath))) {
<div (click)="showOverlay(filePath)">
<video
src="{{ filePath }}"

View file

@ -27,12 +27,6 @@ export class AttachmentsComponent {
RESPONSIVE_THRESHOLD = this.sharedService.RESPONSIVE_THRESHOLD;
// Type of files:
// Img: PNG, GIF, JPG, JPEG
// Files: PDF, DOC, TXT
// Audio: MP3, WMA, WAV
// Video: MP4
/**
* Gets the file type from the given file name.
* @param {string} file - The name of the file.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB