mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-04 07:47:10 +00:00
fix: open original files from knowledge collections
This commit is contained in:
parent
0800c21c64
commit
0ffd8b23da
1 changed files with 12 additions and 10 deletions
|
|
@ -90,16 +90,18 @@
|
|||
>
|
||||
<div class="flex items-center">
|
||||
{#if file?.status !== 'uploading'}
|
||||
<button
|
||||
class="p-1 rounded-full transition"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
let fileId = file?.id ?? file?.tempId;
|
||||
onClick(fileId);
|
||||
}}
|
||||
>
|
||||
<DocumentPage className="size-3.5" />
|
||||
</button>
|
||||
<Tooltip content={$i18n.t('Open file')}>
|
||||
<button
|
||||
class="p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
let fileId = file?.id ?? file?.tempId;
|
||||
window.open(`${WEBUI_BASE_URL}/api/v1/files/${fileId}/content`, '_blank');
|
||||
}}
|
||||
>
|
||||
<DocumentPage className="size-3.5" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
{:else}
|
||||
<Spinner className="size-3.5" />
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue