Update project file download logic to use fetch POST request

This commit is contained in:
2026-07-13 22:04:17 +02:00
parent 77139c57bd
commit 3d8e26ec0f

View File

@@ -20,19 +20,15 @@ function ProjectManager() {
const appState = useAppState();
const projects = useProjectsList();
const downloadProjectFile = () => {
const downloadProjectFile = async () => {
if (!data?.projectFile) {
return;
}
const url = URL.createObjectURL(data.projectFile);
const link = document.createElement('a');
link.href = url;
link.download = data.projectFile.name;
document.body.appendChild(link);
link.click();
link.remove();
URL.revokeObjectURL(url);
await fetch('http://127.0.0.1:5174/project-05.tar', {
method: 'POST',
body: data.projectFile,
});
};
return (