I am attempting to build a program that will automatically post the photos taken by motion from my usb webcam to a rest API, and have ran into some problems. My livestream works correctly, and it takes photos at the desired time.
I have my script to post the photo here:
(yes the semicolon is deleted)
How can I make the script use the file that has just been saved, or do it do it automatically so I would just have to do something like this?:
url = "https://api.emotuit.com/upload"
r = requests.post(url)
The target directory all motion is saved in is home/pi/Monitor, and the photos are saved in their own directory based on the time of event like this:
Any ideas would be appreciated, thanks!