Hi everybody, can please someone give me an example how to upload files? On my ESP32 I am running an asynchronous webserver, the index.html/style.css/javascript.js reside on a SD-card, and I use websockets to display some dynamic data with the webserver (soft AP). I want to add a field in my index.html (and a submit-button…) to select and upload files, that should be saved onto the SD-card. My actual code is based on the book “Build Web Servers V2” from RNT, module 3, chapter 2.3 “Outputs websockets”.
Thanks in advance!
Hi Michael.
I’m not sure that I understood your question.
Do you want to be able to select which files to display on the web page?(and those files are saved on a microSD card).
If that’s what you’re looking for, I recommend taking a look at the following tutorials:
- https://randomnerdtutorials.com/esp32-microsd-card-arduino/
- https://randomnerdtutorials.com/esp32-web-server-microsd-card/
It may also help taking a look at the quick examples provided in the documentation of the AsyncWebServer library:
Regards,
Sara
Hi Sara,
my ESP32 runs the ASynchronous webserver to display some information from the ESP32. I have also connected a LED Matrix to that ESP32, it displays pictures and the data files for the pictures are stored on the SD-card. Now I want to upload more data files from my smartphone to the SD-card so that I can show more pictures.
I am looking for examples how to provide an “file select” and “submit” button on the webpage, that runs on the ESP32.
Best, Michael.
Hi Michael.
Unfortunately, at the moment, we don’t have any examples for that specific project.
I found this tutorial that seems to cover some of the features that you want:
- iotsharing.com/2019/07/how-to-turn-esp-with-sdcard-or-spiffs-a-web-file-server.html
Regards,
Sara