mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
Extracted the WebUpdate example into a library.
This ESP8266HTTPUpdateServer can be instantiated and used more cleanly, it's also able to take or create an ESP8266WebServer to configure the events and /update handler. It's been made more robust by handling upload abort, which depends on fix provided for issue #833
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
#ifndef __HTTP_UPDATE_SERVER_H
|
||||
#define __HTTP_UPDATE_SERVER_H
|
||||
|
||||
class ESP8266WebServer;
|
||||
|
||||
class ESP8266HTTPUpdateServer
|
||||
{
|
||||
private:
|
||||
bool _serial_output;
|
||||
ESP8266WebServer *_server;
|
||||
static const char *_serverIndex;
|
||||
public:
|
||||
ESP8266HTTPUpdateServer(bool serial_debug=false);
|
||||
void setup(ESP8266WebServer *server=NULL);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user