To get the files downloaded search for serveStatic function and point this function to SPIFFS ( https://github.com/me-no-dev/ESPAsyncWe ... -directory ).
Found:
// Serve files in directory "/" when request url starts with "/"
// Request to the root or none existing files will try to server the defualt
// file name "index.htm" if exists
serverAsync.serveStatic("/", SPIFFS, "/");
Code only displays file when a URL is selected; no file download option.
Thank you.
Wiliam
Method trying to use:
Code from previous web server that enabled file to be download:
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/plain");
client.println("Content-Disposition: attachment");
client.println("Content-Length:");
client.println("Connnection: close");
client.println();
readFile();
Project web page --Served from ESP32
Worked before converting to AsyncWebServer.
William