mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 19:46:54 +03:00
Merge pull request #1086 from haverland/rolling
Add file length check before upload ota
This commit is contained in:
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -268,6 +268,8 @@ jobs:
|
|||||||
zip -r ../release/update.zip .
|
zip -r ../release/update.zip .
|
||||||
cd ../firmware
|
cd ../firmware
|
||||||
zip -r ../release/initial_esp32_setup.zip .
|
zip -r ../release/initial_esp32_setup.zip .
|
||||||
|
cd ../sd-card/html
|
||||||
|
zip -r ../../firmware/html-from-11.3.1.zip .
|
||||||
|
|
||||||
|
|
||||||
# extract the version used in next step
|
# extract the version used in next step
|
||||||
@@ -302,6 +304,8 @@ jobs:
|
|||||||
body: ${{ steps.extract-release-notes.outputs.release_notes }}
|
body: ${{ steps.extract-release-notes.outputs.release_notes }}
|
||||||
files: |
|
files: |
|
||||||
release/*
|
release/*
|
||||||
|
firmware/firmware.bin
|
||||||
|
firmware/html-from-11.3.1.zip
|
||||||
|
|
||||||
|
|
||||||
# Commit&Push Changelog to master branch. Must be manually merged back to rolling
|
# Commit&Push Changelog to master branch. Must be manually merged back to rolling
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
The release breaks a few things in ota update. So **read the update from version 11.3.1 carefully**.
|
||||||
|
|
||||||
|
1.) You should update to 11.3.1 before you update to this release. All other are not tested.
|
||||||
|
2.) Upload and update the firmware.bin file from this release. **but do not reboot**
|
||||||
|
3.) Upload the html-from-11.3.1.zip in html upload and update the web interface.
|
||||||
|
4.) Now you can reboot.
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- automatic release creation
|
- automatic release creation
|
||||||
@@ -11,6 +17,7 @@
|
|||||||
- using the update.zip from release page <https://github.com/jomjol/AI-on-the-edge-device/releases>
|
- using the update.zip from release page <https://github.com/jomjol/AI-on-the-edge-device/releases>
|
||||||
- status (upload, processing, ...) displayed
|
- status (upload, processing, ...) displayed
|
||||||
- auto suggestion for reboot (or not in case of web ui update only)
|
- auto suggestion for reboot (or not in case of web ui update only)
|
||||||
|
- Best for OTA use Firefox. Chrome works with warnings. Safari stuck in upload.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Integrated version info better into the html (main page, logfile)
|
- Integrated version info better into the html (main page, logfile)
|
||||||
@@ -25,7 +32,7 @@
|
|||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Remove `/firmware` from GitHub.
|
- Remove `/firmware` from GitHub.
|
||||||
- If you want to get the latest firmware and html files, please download from the automated (build action)[https://github.com/jomjol/AI-on-the-edge-device/actions] or (release page)[https://github.com/jomjol/AI-on-the-edge-device/releases]
|
- If you want to get the latest firmware and html files, please download from the automated [build action](https://github.com/jomjol/AI-on-the-edge-device/actions) or [release page](https://github.com/jomjol/AI-on-the-edge-device/releases)
|
||||||
|
|
||||||
## [11.3.1] - (2022-09-17)
|
## [11.3.1] - (2022-09-17)
|
||||||
Intermediate Digits
|
Intermediate Digits
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ function upload() {
|
|||||||
alert("No file selected!");
|
alert("No file selected!");
|
||||||
} else if (filePath.length == 0) {
|
} else if (filePath.length == 0) {
|
||||||
alert("File path on server is not set!");
|
alert("File path on server is not set!");
|
||||||
|
} else if (filePath.length > 100) {
|
||||||
|
alert("Filename is to long! Max 100 characters.");
|
||||||
} else if (filePath.indexOf(' ') >= 0) {
|
} else if (filePath.indexOf(' ') >= 0) {
|
||||||
alert("File path on server cannot have spaces!");
|
alert("File path on server cannot have spaces!");
|
||||||
} else if (filePath[filePath.length-1] == '/') {
|
} else if (filePath[filePath.length-1] == '/') {
|
||||||
@@ -199,7 +201,7 @@ function upload() {
|
|||||||
xhttp.open("POST", upload_path, false);
|
xhttp.open("POST", upload_path, false);
|
||||||
document.getElementById("status").innerText = "Status: uploading";
|
document.getElementById("status").innerText = "Status: uploading";
|
||||||
xhttp.send(file);
|
xhttp.send(file);
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById("status").innerText = "Status: processing on ESP32";
|
document.getElementById("status").innerText = "Status: processing on ESP32";
|
||||||
|
|
||||||
@@ -228,6 +230,7 @@ function upload() {
|
|||||||
var _toDo = basepath + "/ota?task=update&file=" + filePath;
|
var _toDo = basepath + "/ota?task=update&file=" + filePath;
|
||||||
xhttp.open("GET", _toDo, false);
|
xhttp.open("GET", _toDo, false);
|
||||||
xhttp.send();
|
xhttp.send();
|
||||||
|
}
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
|
|
||||||
document.getElementById("reboot").disabled = false;
|
document.getElementById("reboot").disabled = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user