Why can't I upload images through POST written in Delphi? I used Delphi to write a POST and want to implement the automatic upload function. However, even if I simulate the entire package, the image cannot be submitted! The following is the PHP code PHPcode & lt; metahttp-equiv = & quot; Content-Type & qu why POST written in Delphi cannot upload images?
I used Delphi to write a POST and want to implement the automatic upload function. However, even if I simulate the entire package, the image cannot be submitted!
The following is the PHP code.
PHP code
FileUpload
The following are the packet capture packages submitted by the normal web page submission and the POST program written by Delphi.
XML code
POST/aa. php HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd. ms-excel, application/vnd. ms-powerpoint, application/msword, application/x-silverlight, */* Referer: http://116.254.216.83/aa.phpAccept-Language : Zh-cnContent-Type: multipart/form-data; boundary = --------------------------- runtime: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) host: 116.254.216.83Content-Length: 37420 Connection: Keep-AliveCache-Control: no-cache expires 7dc38a1d60e20Content-Disposition: form-data; name = "upfile"; filename = "C: \ Documents and Settings \ Ad Mini-strator \ photo Upload \ Test \ 789_3.jpg "Content-Type: image/pjpeg ?? = ===================================== The following are the packets submitted and intercepted by the Delphi program ====== =========================== POST/aa. php HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd. ms-excel, application/vnd. ms-powerpoint, application/msword, application/x-silverlight, */* Referer: http://116.254.216.83/aa.phpAccept-Language : Zh-cnContent-Type: multipart/form-data; boundary = --------------------------- runtime: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) host: 116.254.216.83Connection: Keep-AliveContent-Length: 37630Cache-Control: no-cache %7dcbbd%b68content-disposition: form-data; name = "upfile"; filename = "D: \ Test \ 789_5.jpg "Content-Type: Image/pjpeg ??