Pi Curl Upload

Forums:

Concept

There are times when you are using a non-gui interface but would still like to be able to upload files which you can use later without requiring a browser to do so. Curl is a handy pi application which allows this type of html post interaction (and all kinds of other web things).

Resources

w3schools
Medium.com

Curl Command:

(Change pcd to match your secret key)
curl 'pcd=secretuploadkey' -F 'fileToUpload=@./webcheck.png' localhost/uload.php

Note: you do not need the html form to process curl, it is going directly to the php page.
You will need to insure your upload directory has permissions for writing.
You can change the types of files allowed in the file association area.

A Simple HTML Form


A Simple PHP Script

The script will append a stamp if the file already exists.
-6.1193329,39.1580149,05-20-2019 01:25:45 AM,!On a treasure hunt