Improved OTA (empty firmware directory)

This commit is contained in:
jomjol
2022-11-05 11:33:26 +01:00
parent 8c6805ec7c
commit 885cd71b80
3 changed files with 29 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ function prepareOnServer() {
var nameneu = document.getElementById("newfile").value;
filePath = nameneu.split(/[\\\/]/).pop();
/* first delete the old firmware */
/* first delete the old firmware AND empty the /firmware directory*/
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
stopProgressTimer();
@@ -159,7 +159,7 @@ function prepareOnServer() {
startProgressTimer("Server preparations...");
var _toDo = basepath + "/ota?delete=" + filePath;
var _toDo = basepath + "/ota?task=emptyfirmwaredir";
xhttp.open("GET", _toDo, true);
xhttp.send();
}