This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example how to serve files from an SD-card using Me No Dev's async webserver for the ESP8266. | |
* See https://github.com/me-no-dev/ESPAsyncWebServer | |
* | |
* Basically I copied the code for serving static files from SPIFFS and modified it for the SD library. | |
* To resolve conflicts between SPIFFS and SD File classes I had to include the sd namespace in SD.h and SD.cpp in packages/esp8266/hardware/esp8266/2.3.0/libraries/SD/src. | |
* So in SD.h put "namespace sd { ... }; using namespace sd;" around everything excluding the # preprocessor directives. | |
* And in SD.cpp put "namespace sd { ... };" around everything excluding the # preprocessor directives. | |
* | |
* Also, don't forget to fill in your WiFi SSID and password and put an index.htm file on your SD card. |