mirror of
				https://github.com/open-webui/open-webui
				synced 2025-06-26 18:26:48 +00:00 
			
		
		
		
	Merge pull request #7828 from juananpe/fixdownloadcitations
fix: use WEBUI_API_BASE_URL for file download links in Citations
This commit is contained in:
		
						commit
						bd88aa2af9
					
				@ -2,6 +2,7 @@
 | 
			
		||||
	import { getContext, onMount, tick } from 'svelte';
 | 
			
		||||
	import Modal from '$lib/components/common/Modal.svelte';
 | 
			
		||||
	import Tooltip from '$lib/components/common/Tooltip.svelte';
 | 
			
		||||
	import { WEBUI_API_BASE_URL } from '$lib/constants';
 | 
			
		||||
 | 
			
		||||
	const i18n = getContext('i18n');
 | 
			
		||||
 | 
			
		||||
@ -91,7 +92,7 @@
 | 
			
		||||
									<a
 | 
			
		||||
										class="hover:text-gray-500 hover:dark:text-gray-100 underline flex-grow"
 | 
			
		||||
										href={document?.metadata?.file_id
 | 
			
		||||
											? `/api/v1/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}`
 | 
			
		||||
											? `${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
 | 
			
		||||
												: `#`}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user