You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add Chat Permission toggle to control file download in citations (avoid confidential data leakage) 在 Chat Permissions 增加控制是否允許下載檔案的開關(避免機密資料外洩)
#17291
I have searched the existing issues and discussions.
Problem Description
Feature Description
Currently, in CitationsModal.svelte (around line 95), uploaded files referenced in citations are always rendered with a clickable <a> link that allows downloading or opening the file.
For environments dealing with confidential or sensitive documents, this behavior may cause potential data leakage risks.
We propose adding a new Chat Permission setting:
Allow File Download (default: enabled)
If disabled, citations should only show the file name (and optional page number), but without a clickable download link.
This discussion was converted from issue #17288 on September 09, 2025 09:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Check Existing Issues
Problem Description
Feature Description
Currently, in CitationsModal.svelte (around line 95), uploaded files referenced in citations are always rendered with a clickable
<a>link that allows downloading or opening the file.For environments dealing with confidential or sensitive documents, this behavior may cause potential data leakage risks.
We propose adding a new Chat Permission setting:
If disabled, citations should only show the file name (and optional page number), but without a clickable download link.
Desired Solution you'd like
建議新增一個 Chat Permission:
若關閉,Citation 僅顯示檔名(及選填的頁碼),但不提供下載連結。
Example Code (CitationsModal.svelte)
Current (always clickable):
Proposed (respect permission):
{#if $permissions.allowFileDownload} <a class="hover:text-gray-500 dark:hover:text-gray-100 underline grow" href={document?.metadata?.file_id ? `${WEBUI_API_BASE_URL}/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}` : document.source?.url?.includes('http') ? document.source.url : `#`} target="_blank" > {decodeString(document?.metadata?.name ?? document.source.name)} </a> {:else} <span class="text-gray-400 dark:text-gray-300"> {decodeString(document?.metadata?.name ?? document.source.name)} </span> {/if}Benefits
Alternatives Considered
No response
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions