|
20精币
还没搞过post上传图片,不知道咋弄!网站上面是选择一个图片 点击上传就完成了,抓包数据如下
http://www.getode.cn/kess/order/upload
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,zh;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Content-Length:61366
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryEMwk5zBGfrX4f0He
Cookie:siv=3431561216; govsi=s5796039680; sid=15fd46e340d4e8462dfa6a21; cd2=791061f88c150441b465004fde7bce8579458282
Host:www.getode.cn
Origin:www.getode.cn
Pragma:no-cache
Referer:http://www.getode.cn/get/order/
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0
------WebKitFormBoundaryEMwk5zBGfrX4f0He
Content-Disposition: form-data; name="id"
24331827
------WebKitFormBoundaryEMwk5zBGfrX4f0He
Content-Disposition: form-data; name="report"
1
------WebKitFormBoundaryEMwk5zBGfrX4f0He
Content-Disposition: form-data; name="file"; filename="222.png"
Content-Type: image/png
------WebKitFormBoundaryEMwk5zBGfrX4f0He
Content-Disposition: form-data; name="voucher_state"
2
------WebKitFormBoundaryEMwk5zBGfrX4f0He
Content-Disposition: form-data; name="voucher_remark"
------WebKitFormBoundaryEMwk5zBGfrX4f0He--
补充内容 (2018-5-17 19:40):
图片数据是哪一部分啊?是不是把图片数据 替换成要传的图片,然后协yi头搞对就ok了i?
补充内容 (2018-5-17 22:57):
搞定了搞定了,主要是数据搞错了,数据搞对传图就好了 |
最佳答案
查看完整内容
和普通post 没啥区别///
这是我以前学易语言写的,当时可以上传。.版本 2
.支持库 spec
提交数据 = 到字节集 (#包头) + 图片数据 + 到字节集 (#包尾)
' 数据大小 = 到整数 (图片数据)
http.Open (“post”, “http://chuantu.biz/upload.php”)
http.SetRequestHeader (“Content-Type”, “multipart/form-data; boundary=----WebKitFormBoundaryGVctkiQCbdv0JIBE”)
http.SendBin (提交数据)
调试输出 (http.GetResponseT ...
|