💄 Limit the size and number of uploaded files

💄 Limit the size and number of uploaded files
This commit is contained in:
Clivia
2024-08-02 21:36:17 +08:00
parent 7fa9f381e1
commit b6da4baa97
43 changed files with 298 additions and 49 deletions

View File

@@ -53,6 +53,8 @@
template: '',
r: 0.0,
k: 4,
max_file_size: 10,
max_file_count: 5,
hybrid: false
};
@@ -386,6 +388,41 @@
</div>
{/if}
<div class=" my-2 flex gap-1.5">
<div class=" w-full justify-between">
<div class="self-center text-xs font-medium min-w-fit mb-1">
{$i18n.t('Max File Count')}
</div>
<div class="self-center">
<input
class=" w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none"
type="number"
placeholder={$i18n.t('Enter Max File Count')}
bind:value={querySettings.max_file_count}
autocomplete="off"
min="0"
/>
</div>
</div>
<div class="w-full">
<div class=" self-center text-xs font-medium min-w-fit mb-1">
{$i18n.t('Max File Size(MB)')}
</div>
<div class="self-center">
<input
class="w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none"
type="number"
placeholder={$i18n.t('Enter Max File Size(MB)')}
bind:value={querySettings.max_file_size}
autocomplete="off"
min="0"
/>
</div>
</div>
</div>
<div class=" flex w-full justify-between">
<div class=" self-center text-xs font-medium">{$i18n.t('Hybrid Search')}</div>