login about faq

i have to upload a file using multipart post. I am having trouble with boundary. It generate boundary itself, but site ask for custom boundary

What site wants

-----------------------------309821703319246 Content-Disposition: form-data; name="img"; filename="Jellyfish.jpg" Content-Type: image/jpeg

And here is what chilkat is generating

--------------050307070900020401040803 Content-Disposition: form-data; name="img"; filename="Desert.jpg" Content-Type: image/jpeg

Chilkat is not accepting custom boundary

Code i am using

req.AddFileForUpload2("img", @"C:UsersPublicPicturesSample PicturesDesert.jpg", "image/jpeg"); req.ContentType = "multi part/form-data; boundary=---------------------------" + rand(13); req.AddHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"); req.AddHeader("Accept-Encoding", "gzip, deflate"); req.AddHeader("Accept-Language", "en-US,en;q=0.5"); req.AddHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0"); resp = http.SynchronousRequest(domain, 80, false, req);

asked Oct 18 '13 at 17:43

aki003's gravatar image


It is impossible to answer this question because it has not been communicated in an intelligible or readable manner.


answered Oct 23 '13 at 09:01

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 18 '13 at 17:43

Seen: 2,613 times

Last updated: Oct 23 '13 at 09:01

powered by OSQA