Wednesday, 23 April 2014

How to post a file on a web form using wget

The command
wget --header="Content-type: multipart/form-data boundary=FILEUPLOAD" --post-file postfile http://domain/uploadform
Content of postfile below

Content-Disposition: form-data; name="comment"

I love uploading files!

Content-Disposition: form-data; name="userfile"; filename="yourfile.bin";
Content-Type: application/octet-stream
Media Type: application/octet-stream



That's it!


No comments:

Post a comment