You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
888 B
25 lines
888 B
3 years ago
|
#ifndef SPIFFSEditor_H_
|
||
|
#define SPIFFSEditor_H_
|
||
|
#include <ESPAsyncWebServer.h>
|
||
|
|
||
|
class SPIFFSEditor: public AsyncWebHandler {
|
||
|
private:
|
||
|
fs::FS _fs;
|
||
|
String _username;
|
||
|
String _password;
|
||
|
bool _authenticated;
|
||
|
uint32_t _startTime;
|
||
|
public:
|
||
|
#ifdef ESP32
|
||
|
SPIFFSEditor(const fs::FS& fs, const String& username=String(), const String& password=String());
|
||
|
#else
|
||
|
SPIFFSEditor(const String& username=String(), const String& password=String(), const fs::FS& fs=SPIFFS);
|
||
|
#endif
|
||
|
virtual bool canHandle(AsyncWebServerRequest *request) override final;
|
||
|
virtual void handleRequest(AsyncWebServerRequest *request) override final;
|
||
|
virtual void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t index, uint8_t *data, size_t len, bool final) override final;
|
||
|
virtual bool isRequestHandlerTrivial() override final {return false;}
|
||
|
};
|
||
|
|
||
|
#endif
|