diff --git a/frontend/src/components/file-browser/FileBrowser.tsx b/frontend/src/components/file-browser/FileBrowser.tsx index 92c1a53..66b1b24 100644 --- a/frontend/src/components/file-browser/FileBrowser.tsx +++ b/frontend/src/components/file-browser/FileBrowser.tsx @@ -274,7 +274,7 @@ useEffect(() => { {/* Mobile: Full width file listing, Desktop: Split view */}
-
+
{ + if (file.isDirectory) return + + const downloadUrl = `${API_BASE_URL}/api/files/${file.path}?download=true` + const link = document.createElement('a') + link.href = downloadUrl + link.download = file.name + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + } + const getFileIcon = () => { if (file.isDirectory) { return expanded ? : @@ -167,12 +183,18 @@ function TreeNode({ file, level, onFileSelect, onDirectoryClick, selectedFile, o + {!file.isDirectory && ( + + + Download + + )} Rename