diff options
Diffstat (limited to 'frontend/src/components/LeftSidebar.tsx')
| -rw-r--r-- | frontend/src/components/LeftSidebar.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/components/LeftSidebar.tsx b/frontend/src/components/LeftSidebar.tsx index 1df63fe..1a111bf 100644 --- a/frontend/src/components/LeftSidebar.tsx +++ b/frontend/src/components/LeftSidebar.tsx @@ -191,7 +191,7 @@ const LeftSidebar: React.FC<LeftSidebarProps> = ({ isOpen, onToggle }) => { const handleDownload = async (item: FSItem) => { if (item.type !== 'file') return; - const url = `${import.meta.env.VITE_BACKEND_URL || 'http://localhost:8000'}/api/projects/download?user=test&path=${encodeURIComponent(item.path)}`; + const url = `${import.meta.env.VITE_BACKEND_URL || ''}/api/projects/download?user=test&path=${encodeURIComponent(item.path)}`; const a = document.createElement('a'); a.href = url; a.download = item.name; @@ -276,7 +276,7 @@ const LeftSidebar: React.FC<LeftSidebarProps> = ({ isOpen, onToggle }) => { }; const handleDownloadFile = (file: FileMeta) => { - const url = `${import.meta.env.VITE_BACKEND_URL || 'http://localhost:8000'}/api/files/download?user=test&file_id=${encodeURIComponent(file.id)}`; + const url = `${import.meta.env.VITE_BACKEND_URL || ''}/api/files/download?user=test&file_id=${encodeURIComponent(file.id)}`; const a = document.createElement('a'); a.href = url; a.download = file.name; |
