Can download ISO files
This commit is contained in:
@ -20,7 +20,7 @@ export class IsoFilesApi {
|
||||
method: "POST",
|
||||
uri: "/iso/upload",
|
||||
formData: fd,
|
||||
progress: progress,
|
||||
upProgress: progress,
|
||||
});
|
||||
}
|
||||
|
||||
@ -47,6 +47,24 @@ export class IsoFilesApi {
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download an ISO file
|
||||
*/
|
||||
static async Download(
|
||||
file: IsoFile,
|
||||
progress: (p: number) => void
|
||||
): Promise<Blob> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
method: "GET",
|
||||
uri: `/iso/${file.filename}`,
|
||||
downProgress(e) {
|
||||
progress(Math.floor(100 * (e.progress / e.total)));
|
||||
},
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete iso file
|
||||
*/
|
||||
|
Reference in New Issue
Block a user