lcd upload endpoint
This commit is contained in:
parent
91fb96f596
commit
d056e6fa7b
|
@ -15,6 +15,7 @@
|
||||||
"*.d": "cpp",
|
"*.d": "cpp",
|
||||||
"*.html": "cpp",
|
"*.html": "cpp",
|
||||||
"*.tcc": "cpp",
|
"*.tcc": "cpp",
|
||||||
"regex": "cpp"
|
"regex": "cpp",
|
||||||
|
"cstdlib": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -423,6 +423,19 @@ void ota_begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
otaserver.on("/lcd_update",HTTP_POST,[]() {
|
||||||
|
otaserver.sendHeader("Connection","close");
|
||||||
|
},[](){
|
||||||
|
HTTPUpload &upload = otaserver.upload();
|
||||||
|
if(upload.status == UPLOAD_FILE_START) {
|
||||||
|
Serial.println(upload.totalSize);
|
||||||
|
} else if (upload.status == UPLOAD_FILE_WRITE) {
|
||||||
|
for(int i = 0; i<upload.currentSize;i++)
|
||||||
|
Serial.print(upload.buf[i],HEX);
|
||||||
|
} else if (upload.status == UPLOAD_FILE_END) {
|
||||||
|
Serial.println("Upload End");
|
||||||
|
}
|
||||||
|
});
|
||||||
otaserver.begin();
|
otaserver.begin();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue