I have a script which runs remotely on a school PC, which is part of a renderfarm I build for my friend. I needed it to be able to upload the rendered file to my server. Here's how I managed to do this:

On my server I have a page with this simple form to upload the file:

<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="rfile" />
<input type="submit"/>
</form>

This following command send a file via a POST request:

curl --form rfile=@renderedfile.jpg --form press=submit http://example.com/upload.php

This script is platform-independent. Enjoy!