Moved index.html from SPIFFS to program memory. Removed dependencies to SPIFFS. Also, we can use a different partition scheme with much more program space instead of reserving some of it for SPIFFS.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "http_server.h"
|
||||
#include "main.h"
|
||||
#include "spi_master.h"
|
||||
#include <ESPmDNS.h>
|
||||
#include <SPIFFS.h>
|
||||
|
||||
HTTPServer::HTTPServer(Player* p, Controller* c) {
|
||||
_player = p;
|
||||
@@ -12,7 +12,7 @@ HTTPServer::HTTPServer(Player* p, Controller* c) {
|
||||
ws->onEvent([&](AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len){this->_onEvent(server, client, type, arg, data, len);});
|
||||
|
||||
_server->on("/", HTTP_GET, [&](AsyncWebServerRequest* req) {
|
||||
req->send(SPIFFS, "/index.html", "text/html");
|
||||
req->send(200, "text/html", (const char*)file_index_html_start);
|
||||
});
|
||||
_server->on("/upload", HTTP_POST, [](AsyncWebServerRequest* req) {
|
||||
req->send(200);
|
||||
|
||||
Reference in New Issue
Block a user