Open JoergTiedemann opened 8 months ago
Just a "me too". I really need to use SdFat, or at least something more reliable than SD.h. I have added web functions to my project, but I'll have to pull them all out if I can't solve this. Reliable reading and writing of data is more important to my project than the web features.
server.on("/favicon.ico", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SD, "/favicon.ico", "image/x-icon"); });
include "SD.h" #include "FS.h"
A solution using SD.h does not help. I get much higher error rates using SD.h.
My current workaround is
server.serveStatic("/", SPIFFS, "/htdocs/").setCacheControl("max-age=86400");
request->sendChunked()
and call my own function which reads up to 4096 bytes at a time using SdFat.Of course either half of the workaround could work for all files, but this work for me. It is partly because my static files are mostly small and the only file I normally send from the SD card can be very large.
Is there any solution to support hosting files from an sd card using sd_fat library ? in request->send first parameter is fs::FS or File but not FsFile which is used by SdFat Library