Current Lua downloadable firmware will be posted here

User avatar
By ma.ag37
#52851 Hi,

I want to save some images on ESP8266 module for their use in HTML page to be served to clients connected.
I tried sending the jpg image file to the module using ESPlorer but the file sent to the module seems to be damaged as the file size on module and my computer differs. I tried sending files back and forth, and the file received back on the computer from the modules is damaged as well.

Please help me in solving the issue
User avatar
By ma.ag37
#52854 I got the image successfully transferred to the module without damage but I am unable to get it successfully delivered to the connected clients on the webpage.

I use the following code:


if received_request == "smarty_home.jpg " then
print("image request received\n")
file.open("smarty_home.jpg")
print("image_opened\n")

nextline = file.read(1400)
while nextline do
client:send(nextline)
nextline = file.read(1400)
end
file.close()
print ("image_sent\n")

end

But I get only a portion of image at the client on the webpage

Please Help