mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
local sever ota
This commit is contained in:
@@ -89,6 +89,8 @@ void standWebServerInit() {
|
||||
// - second callback handles file upload at that location
|
||||
HTTP.on("/edit", HTTP_POST, replyOK, handleFileUpload);
|
||||
|
||||
HTTP.on("/localota", HTTP_GET, handleLocalOTA);
|
||||
|
||||
// Default handler for all URIs not defined above
|
||||
// Use it to read files from filesystem
|
||||
HTTP.onNotFound(handleNotFound);
|
||||
@@ -156,6 +158,10 @@ void handleStatus() {
|
||||
HTTP.send(200, "application/json", json);
|
||||
}
|
||||
|
||||
void handleLocalOTA() {
|
||||
upgrade_firmware(3, "local");
|
||||
}
|
||||
|
||||
#ifdef ESP32
|
||||
String getContentType(String filename) {
|
||||
if (HTTP.hasArg("download")) {
|
||||
|
||||
Reference in New Issue
Block a user