• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 async webserver – how to upload files to SD-Card?

Q&A Forum › Category: ESP32 › ESP32 async webserver – how to upload files to SD-Card?
0 Vote Up Vote Down
Michael Rogulla asked 4 years ago

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!

Question Tags: upload webserver
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

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:

  • https://github.com/me-no-dev/ESPAsyncWebServer

Regards,
Sara 

0 Vote Up Vote Down
Michael Rogulla answered 4 years ago

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.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

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

1 Vote Up Vote Down
Steve Mercer answered 4 years ago

It looks there is an example available for AssyncWebServer.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Thanks for sharing, Steve.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.