From 254c76b6b016064c16e2385cf598c62dc0d4359e Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 21 Jun 2025 16:59:54 +0200 Subject: [PATCH] update dropzone supported mime types and popup message --- src/app/website/report/Dropzone.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/website/report/Dropzone.svelte b/src/app/website/report/Dropzone.svelte index 9b5a0e1..1d38292 100644 --- a/src/app/website/report/Dropzone.svelte +++ b/src/app/website/report/Dropzone.svelte @@ -7,8 +7,8 @@ let previewDialogElem: HTMLDialogElement; // consts - const allowedImageTypes = ['image/png', 'image/jpeg', 'image/avif']; - const allowedVideoTypes = ['video/mp4']; + const allowedImageTypes = ['image/png', 'image/jpeg', 'image/webp', 'image/avif']; + const allowedVideoTypes = ['video/mp4', 'video/webm']; // types interface Props { @@ -62,7 +62,7 @@ type: 'error', title: 'Ungültige Datei', message: - 'Das Dateiformat wird nicht unterstützt. Nur Bilder (.png, .jpg, .jpeg, .avif) und Videos (.mp4) sind gültig' + 'Das Dateiformat wird nicht unterstützt. Nur Bilder (.png, .jpg, .jpeg, .webp, .avif) und Videos (.mp4, .webp) sind gültig' }; return; } @@ -71,7 +71,7 @@ $popupState = { type: 'error', title: 'Datei zu groß', - message: `Die Dateien dürfen insgesamt nur ${(maxFilesBytes / 1024 / 1024).toFixed(2)}MB groß sein` + message: `Die Dateien dürfen insgesamt nur ${bytesToHumanReadable(maxFilesBytes)} groß sein. Fall deine Anhänge größer sind, lade sie bitte auf einem externen Filehoster hoch (z.B. file.io, Google Drive, ...) und füge den Link zum teilen der Datei(en) zu den Report Details hinzu` }; return; }