Chat freely about anything...

User avatar
By Sirquil
#93371 @ GaryRH Thank you for your request.

You will need four components to list files as URL links:

2. AsyncWebServer request
3. AsyncWebServer Processor
4. Web page stored in memory

Code: CameraRainGage


Processing of the “File Reader” web page by AsyncWebServer:

Main Menu selection, “File Reader” request loads HTML2 (“index2.h”) web page by “Processor2”; which creates the list of filenames as URL links. Function “String notFound(AsyncWebServerRequest *request)” code by Pablo2048 of “” processes selected URL filename link into a SPIFFS, filename and returning the filename (“fn”). Request->redirect("/Show"); loads HTML6 (“index6.h”) web page by “Processor6”. HTML6 has embedded Jason Script from Sara Santos of “Random Nerds Tutorials”; which “GETS” request “/get-file” to display contents of the selected “File Reader” filename. HTML6 adds web page title, header and links; to return to “File Reader” and “Main Menu” links.

Contents of a file from “File Reader”:


File Reader.jpg