If I set up an html page with the following form:
<html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> </body> </html>
I can upload the file to upload_file.php file, where I can process it using php script.
For testing purposes, I need to do the same using raw HTTP through a Putty session.
I can do a regular POST (just sending text data) as follows:
POST /test_post.php HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 11 name=myname
How can I send a file this way?
xbonez
source share