Preface: I have images being generated every few hours from a script. These images get saved to the local filesystem of a pi. My goal is to have a webpage display the latest image. I don't want the webserver running on the pi.
What I've tried: I created a php upload handler from an HTML form. This takes an image from the form, and places it on the webserver filesystem and inserts an ID, filename, date, and path into a database. My idea was to post each image using curl from the pi to the webserver and have it upload and inserted into the DB, and then deleted from the Pi's filesystem right after. For whatever reason I can't get the curl to post to the HTML form.
I know this is pretty jank. I don't want to scp the images to the webserver and have a cron job running every minute to process any new files because I want it to be real time, and also don't want php processes just hanging out every minute.
Any ideas would be greatly appreciated!