How to upload a file with cURL

Hi, I am trying to script an upload a file into a specific media gallery from my hard drive using cURL.

I cannot clearly tell from the REST API documentation how to do this or whether it is possible. "Create Media" seems the most likely but the following throws an unclear error:

curl -H "Rest-User-Token: abc123" -X POST -d "Name=TheDesiredFilename" -d "" https://<company>
Error: {"Media":null,"Info":[],"Warnings":[],"Errors":["Only a posted file, file URL, or file upload context is valid, but not more than one."]}
The documentation provides this example:
curl -H "Rest-User-Token: ENCODED_TOKEN" -d "Name=name" -X POST

Can anyone help me understand if this is possible and if so, how?

Thank you.