mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 13:06:23 +01:00
* updated arduinojson to version 7.3.0, enabled comments within json files * update ESPAsyncWebServer/AsyncTCP to the ESP32Async fork ESP32Async/ESPAsyncWebServer and ESP32Async/AsyncTCP are much better maintained and it looks like a lot of bugs are fixed compared to the ESPHome version we used before. * Arduino 3.x compatibility (while maintaining 2.x compatibility)
26 lines
985 B
C++
26 lines
985 B
C++
#ifndef SPIFFSEditor_H_
|
|
#define SPIFFSEditor_H_
|
|
#include <ESPAsyncWebServer.h>
|
|
|
|
class SPIFFSEditor: public AsyncWebHandler {
|
|
private:
|
|
mutable 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) const 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() const override final {return false;}
|
|
virtual String listFilesRecursively(String path, bool recursive = false);
|
|
};
|
|
|
|
#endif
|