I have recently bought a Raspberry Pi Zero and an infrared camera. I want to make an http server which serves pictures that will be captured when a Pir sensor detects movement. I run a python script listening for movement, taking pictures and saving them to a folder. I want to make a dynamic http server using python. The pictures are in /home/pi/raspberryProject. In the same folder is the python script for the http server. I am using BaseHTTPServer module. This is the html part:
Code: Select all
"""Respond to a GET request."""
s.send_response(200)
s.send_header("Content-type", "text/html")
s.end_headers()
s.wfile.write("<html>")
s.wfile.write("<body><img src=\"img.jpg\">")
s.wfile.write("<body><img src=\"/img.jpg\">") #both don't work
s.wfile.write("</body></html>")Thanks for any help and comments


