Firmware upload is functional
This commit is contained in:
@ -12,4 +12,22 @@ export class OTAAPI {
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload new OTA firwmare
|
||||
*/
|
||||
static async UploadFirmware(
|
||||
platform: string,
|
||||
version: string,
|
||||
firmware: File
|
||||
): Promise<void> {
|
||||
const fd = new FormData();
|
||||
fd.append("firmware", firmware);
|
||||
|
||||
await APIClient.exec({
|
||||
method: "POST",
|
||||
uri: `/ota/${platform}/${version}`,
|
||||
formData: fd,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user