working basic OTA

This commit is contained in:
Siwat Sirichai 2024-01-15 21:56:07 +07:00
parent df09914bd3
commit a2fe4a3d67
5 changed files with 207 additions and 195 deletions

View file

@ -55,7 +55,7 @@
// Update the progress bar
var percent = Math.floor(index / size * 100);
$('#bar').css('width', percent + '%');
$('#prg').html("Uploading: " + percent + ' (' + index + '/' + size + ')');
$('#prg').html("Uploading: " + percent + "%" +' (' + index + '/' + size + ')');
sendNextChunk();
}
});
@ -63,8 +63,7 @@
// End the update
$.ajax({
url: path + 'ota/end',
type: 'POST',
contentType: 'application/json'
type: 'POST'
});
}
}