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
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
This commit is contained in:
@@ -217,14 +217,8 @@ export async function download(path, filename) {
|
|||||||
|
|
||||||
const { token: downloadToken } = await tokenResponse.json();
|
const { token: downloadToken } = await tokenResponse.json();
|
||||||
|
|
||||||
// Use the token to trigger browser download (no memory loading)
|
// Navigate directly to download URL - browser handles streaming natively
|
||||||
const downloadUrl = `${BASE}/files/download?token=${downloadToken}`;
|
window.location.href = `${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);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Download error:", e);
|
console.error("Download error:", e);
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
Reference in New Issue
Block a user