8 years ago.

How to transfer picture to Webserver's root directory

I am currently working on an urgent project that involves setting up a webserver on the chip mentioned above running NodeMCU firmware. I want to find out if you guys can send me a sample code on how to send picture from a microcontroller (Mbed, attached to the WiFi module) to the root directory of the webserver setup on the WiFi module. In order words, I want to setup a webserver on the ESP8622 Huzzah WiFi module that has a picture that will be displayed when the page is loaded.

I understand the code below sets up a webserver, but if it has an html image tag, how am I going to upload the image to the webserver’s root directory and reference it in the html code running on the server? (e.g: <img src="/IMG_0001.jpg" alt="cam-img" style="width:320px;height:240px;">)

Question relating to:

Be the first to answer this question.