Upload local file to server


#1

I’m watching if a new image is added to a local dir using "chokidar’.

After a new image is detected I would like to upload that image together with a form.

How can I upload the form and the image (since the image was not selected by the user (Input=“file”) but was placed on a local dir.

I only have the “path” to the image that I get from “chokidar”

Thank you for your help.