Can upload disk images on the server
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-05-27 20:40:48 +02:00
parent 6a7af7e6c4
commit b55880b43c
13 changed files with 288 additions and 5 deletions

View File

@ -0,0 +1,31 @@
import { APIClient } from "./ApiClient";
export interface DiskImage {}
export class DiskImageApi {
/**
* Upload a new disk image file to the server
*/
static async Upload(
file: File,
progress: (progress: number) => void
): Promise<void> {
const fd = new FormData();
fd.append("file", file);
await APIClient.exec({
method: "POST",
uri: "/disk_images/upload",
formData: fd,
upProgress: progress,
});
}
/**
* Get the list of disk images
*/
static async GetList(): Promise<DiskImage[]> {
// TODO
return [];
}
}