Browse Source

enh: allow file download from collection view

Timothy J. Baek 6 months ago
parent
commit
e8591b57b4
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/lib/components/workspace/Knowledge/Collection.svelte

+ 8 - 2
src/lib/components/workspace/Knowledge/Collection.svelte

@@ -713,8 +713,14 @@
 											</div>
 										{/if}
 
-										<div class=" flex-1 text-2xl font-medium line-clamp-1">
-											{selectedFile?.meta?.name}
+										<div class=" flex-1 text-2xl font-medium">
+											<a
+												class="hover:text-gray-500 hover:dark:text-gray-100 hover:underline flex-grow line-clamp-1"
+												href={selectedFile.id ? `/api/v1/files/${selectedFile.id}/content` : '#'}
+												target="_blank"
+											>
+												{selectedFile?.meta?.name}
+											</a>
 										</div>
 
 										<div>