diff --git a/src/lib/components/chat/ChatWindow.svelte b/src/lib/components/chat/ChatWindow.svelte
index b895a822a5d..ba538ece012 100644
--- a/src/lib/components/chat/ChatWindow.svelte
+++ b/src/lib/components/chat/ChatWindow.svelte
@@ -163,6 +163,8 @@
: []),
...(currentModel.multimodal ? ["image/*"] : []),
];
+
+ $: isFileUploadEnabled = activeMimeTypes.length > 0;
@@ -312,7 +314,7 @@
/>
{:else}
- {#if activeMimeTypes.length > 0}
+ {#if isFileUploadEnabled}
{/if}
{#if messages && lastMessage && lastMessage.interrupted && !isReadOnly}
@@ -334,12 +336,12 @@
on:dragenter={onDragEnter}
on:dragleave={onDragLeave}
tabindex="-1"
- aria-label="file dropzone"
+ aria-label={isFileUploadEnabled ? "file dropzone" : undefined}
on:submit|preventDefault={handleSubmit}
class="relative flex w-full max-w-4xl flex-1 items-center rounded-xl border bg-gray-100 focus-within:border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:focus-within:border-gray-500
{isReadOnly ? 'opacity-30' : ''}"
>
- {#if onDrag && activeMimeTypes.length > 0}
+ {#if onDrag && isFileUploadEnabled}
{:else}