The command
wget --header="Content-type: multipart/form-data boundary=FILEUPLOAD" --post-file postfile http://domain/uploadformContent of postfile below
--FILEUPLOAD
Content-Disposition: form-data; name="comment"
I love uploading files!
--FILEUPLOAD
Content-Disposition: form-data; name="userfile"; filename="yourfile.bin";
Content-Type: application/octet-stream
Media Type: application/octet-stream
content_of_you_file_comes_here
--FILEUPLOAD--
[source]