|
10金钱
本帖最后由 mogu_chulian 于 2014-7-21 23:14 编辑
C#模拟表单POST提交(上传文件)
上传文件怎么弄?
求示例源码。感谢各位大大~
<form id="frmUpload" enctype="multipart/form-data" action="http://www.xxx.com/admin/upload.asp" method="post">
Upload a new file:<br>
<input type="file" name="NewFile" size="50"><br>
<input id="btnUpload" type="submit" value="Upload">
</form>
这个是抓到的包
POST /admin/upload.asp HTTP/1.1
Host: www.xxxxx.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: ASPSESSIONIDSACRABQT=HKBIGCHCNDMJBKBHFPJEAJLF; ASPSESSIONIDSCASBDTQ=LEMJIAICGAHMPMDHLLMELIED
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------25501615619645
Content-Length: 225
-----------------------------25501615619645
Content-Disposition: form-data; name="NewFile"; filename="1.jpg"
Content-Type: image/jpeg
xxxxxxxxxxxx
xxx
-----------------------------25501615619645--
|
最佳答案
查看完整内容
http://www.sufeinet.com/thread-8073-1-1.html
|