Can download disk images
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-29 10:23:26 +02:00
parent 927a51cda7
commit e7ac0198ab
4 changed files with 89 additions and 3 deletions

View File

@ -43,6 +43,24 @@ export class DiskImageApi {
).data;
}
/**
* Download disk image file
*/
static async Download(
file: DiskImage,
progress: (p: number) => void
): Promise<Blob> {
return (
await APIClient.exec({
method: "GET",
uri: `/disk_images/${file.file_name}`,
downProgress(e) {
progress(Math.floor(100 * (e.progress / e.total)));
},
})
).data;
}
/**
* Delete disk image file
*/