Add OTA package upload functionality and UI enhancements

- Introduced a new endpoint for uploading OTA packages in backend/routes/ota.py.
- Implemented file handling and MD5 checksum calculation for OTA packages.
- Updated frontend API to support OTA package uploads with a new uploadOtaPackage function.
- Enhanced the OTA management UI to include file upload options and improved layout.
- Updated requirements.txt to include boto3 for S3 interactions.
- Made various UI adjustments for better user experience and consistency.
This commit is contained in:
yangy
2026-05-15 17:34:54 +08:00
parent 661b85ce62
commit 1a6c96da8c
9 changed files with 511 additions and 132 deletions
+18
View File
@@ -47,3 +47,21 @@ export function deleteOta(id) {
method: 'delete'
})
}
/**
* 上传 OTA 升级包(Luxsin-X9
* @param {File} file
* @param {string} model 设备型号
*/
export function uploadOtaPackage(file, model) {
const formData = new FormData()
formData.append('package_file', file)
formData.append('model', model)
return request({
url: '/ota/upload-package',
method: 'post',
data: formData,
headers: { 'Content-Type': 'multipart/form-data' },
timeout: 300000
})
}