Can download disk images
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user