Unable to serve image from webserver on ESP8266
Posted: Sat Aug 13, 2016 1:00 pm
I have an image on the module 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
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