How to upload an image with esp32 cam

I’m trying to upload an image to the thinger io dashboard with an esp32 cam so I can use a webhook to post it to twitter whenever the camera is triggered. What is the easiest way to do this? I’m currently using an RTSP webserver sketch to get an mjpeg URL but my board won’t connect. Their must be an easier way than using this massive sketch just to get a URL link?

thing.add_wifi(SSID, SSID_PASSWORD);
thing[“ESP32CAM”] >> [](pson& out){
out = “rtsp://192.168.1.***:8554/mjpeg/1”;

Currently using this code to try and get it to post with my IP address, once the link is created

The Image/MJPEG widget needs a public address to access, the address that is your board capturing is in your private network, this will not work.

This particular widget cannot be feeded with a device resource.

If your router gets a public ip address, you can make a rule to address the microcontroller from the web, and this can feed the widget, but not with the private address, this wont work because the server is in other network segment.

Hope this helps.


there is now a file storage feature, which can be used to upload images and display them on the dashboard. What code can I use to get ESP32 Cam to upload to this file storage?


The library currently does not support the storage management in native way, I guess a workaround could be done by http requests to the server API → Swagger UI

Let us know how it goes.

Hello Ega

I have looked into the possibility of using API Post request, but I believe that that will require an authentication token to be embedded in my FW (I am assuming that I could generate a Access Token from the Dashboard), but if this token was then changed my FW would need to be updated.

It would be so much easier if you could add this functionality to the libraries, I am positive this would provide very useful functionality for other developers, e.g where a remote system is being monitored, and goes into an alarm state (maybe an enclosure starts overheating) an image could be sent so that the user can see what might be causing the over heating (maybe there are leaves blocking an air intake?).

It would be so much easier for the community to use images in their aplications if it could be handled from the Thinger libraries instead of trying to manhandle some additional code to do this.

Please please consider this for the next update.

PS, I am using the AI Thinker ESP32 Camera Module

Hi Mark,

As you say for sure it will be needed a token for the API request, what can I recommend is to handle it dynamically, not hard coded into the fw, I would use a device property to store it and when the device connects or gets http error retrieve that property, so you can update it at the platform and the device will update it when connects or get unauthorized error.

On the other hand managers takes notes on community and customers development suggestions, so if it worth the effort for sure will be placed on the roadmap, but there are not warranty that all requests will be developed, and if will be developed there is no release date.

I guess there are http libraries that allow to handle files, if I needed I would give it a try to do some research and even ask at more general forums (as the Arduino forum) about file handling and http library, then try to particularise the solution to thinger case.

Hope this helps


I have managed to get an image uploaded using EndPoint and nodeRED. See Uploading Images to for details. :grin: