Serve logo from LittleFS instead of PROGMEM
This commit is contained in:
-2555
File diff suppressed because it is too large
Load Diff
+4
-2
@@ -1,5 +1,4 @@
|
||||
#include <Arduino.h>
|
||||
#include "logo_png.h"
|
||||
#include <WiFiManager.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <LittleFS.h>
|
||||
@@ -233,7 +232,10 @@ static bool requireAuth() {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static void handleLogo() {
|
||||
server.send_P(200, "image/png", (const char*)LOGO_PNG, LOGO_PNG_SIZE);
|
||||
File f = LittleFS.open("/logo.png", "r");
|
||||
if (!f) { server.send(404, "text/plain", "Not found"); return; }
|
||||
server.streamFile(f, "image/png");
|
||||
f.close();
|
||||
}
|
||||
|
||||
static void handleRoot() {
|
||||
|
||||
Reference in New Issue
Block a user