From 4cd870ef9e9e1ee3a37fcdf016433cf97cf211e7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 5 Dec 2023 16:54:03 +0000 Subject: [PATCH] Don't read attachments into memory unless they are images --- packages/bbui/src/Form/Core/Dropzone.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index dc89476db2..fa0be630ba 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -53,7 +53,7 @@ $: { if (selectedImage?.url) { selectedUrl = selectedImage?.url - } else if (selectedImage) { + } else if (selectedImage && isImage) { try { let reader = new FileReader() reader.readAsDataURL(selectedImage)