Im looking to see if it is possible to use the new esp_http_server.
The usecase is to serve files from spiffs, so you can start creating a website.
Current architecture of this server requires me to register a handler for every URI.
I might be overlooking something here, Is there any way to do this usecase of serving files?
A solution could be to allow matching uri-handlers to have a wildcard, and not only a full string match. E.G:
I want to have an uri handler for /spiffs/* so it would respond also to /spiffs/whateverfilename
The handler would then open the file, look at the extention for content-type and serve it.
esp_http_server to serve files from spiffs
Re: esp_http_server to serve files from spiffs
https://github.com/nkolban/ESP32_Explorer
files are stored in the spifs section and are given to the browser on request
files are stored in the spifs section and are given to the browser on request
-
- Posts: 19
- Joined: Fri Aug 31, 2018 5:37 am
Re: esp_http_server to serve files from spiffs
It may be too late for an answer, but URI wildcard matching scheme was recently added to esp_http_server. See the file server example offered by esp_http_server https://github.com/espressif/esp-idf/tr ... le_serving. This demonstrates serving files kept on SPIFFS storage
Who is online
Users browsing this forum: No registered users and 224 guests