berry webserver class #21760
Replies: 1 comment 9 replies
-
The short version of the issue is that a text string in Berry is null-terminated, meaning that it cannot contain a null. Thus the trouble is not when you send the image, but instead when you read it into a string, which becomes invalid. You should instead read it into a An alternate strategy would be to embed the image in the page you want to send, instead of having it served separately. In the html using |
Beta Was this translation helpful? Give feedback.
-
I am using the webserver functions to develop personal pages stored on the tasmota esp32. To do this i read in a string the page from the UFS and send it using the webserver.content_send. It function well if the string read do not contain a null character (normal for html pages). If i want to send an image file for example a gif, using the webserver.content_open(200, image/gif), the send to the browser stops when in the string is found a null character. I do not know if the problem is in the read of the file in a string or in the send. To avoid the problem there is a solution?
Beta Was this translation helpful? Give feedback.
All reactions