2 Commits

Author SHA1 Message Date
Gan, Jimmy b5b6f9134b fix: use native navigation for file downloads to support large files
Run Tests / Backend Tests (pull_request) Failing after 4m45s
Run Tests / Frontend Tests (pull_request) Failing after 1m20s
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 2m47s
Run Tests / Backend Tests (push) Failing after 5m52s
Run Tests / Frontend Tests (push) Failing after 1m43s
Run Tests / Test Summary (pull_request) Failing after 33s
Run Tests / Test Summary (push) Has been cancelled
2026-04-18 23:57:07 +08:00
jimmy d260f8159a Merge pull request 'Fix streaming downloads for large files' (#51) from fix/streaming-downloads into main
Deploy Dashboard / deploy (push) Failing after 16m43s
Run Tests / Backend Tests (push) Failing after 4m42s
Run Tests / Test Summary (push) Failing after 17s
Run Tests / Frontend Tests (push) Failing after 2m39s
2026-04-18 12:03:26 +08:00
+2 -8
View File
@@ -217,14 +217,8 @@ export async function download(path, filename) {
const { token: downloadToken } = await tokenResponse.json();
// Use the token to trigger browser download (no memory loading)
const downloadUrl = `${BASE}/files/download?token=${downloadToken}`;
const a = document.createElement("a");
a.href = downloadUrl;
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
// Navigate directly to download URL - browser handles streaming natively
window.location.href = `${BASE}/files/download?token=${downloadToken}`;
} catch (e) {
console.error("Download error:", e);
throw e;