Why can't I upload images to a POST written in Delphi?

Source: Internet
Author: User
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 ??

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.