Re: File sending..

Giganews Newsgroups
Subject: Re: File sending..
Posted by:  Remy Lebeau (TeamB) (gambit…
Date: Tue, 26 Aug 2003

"Alexander Adam" <…@aa.aa> wrote in message

> I can call a Perl Script with String Params like
> myurl.cgi?test1=kkjk;test2=jkkjj; with Indy, but how
> can I send a binary file *and* these parameters with
> exactly same format like the Webbrowser does when
> submitting a formular with two input fields and one file field...

File data can't be sent via the URL, aka a GET request.  You have to send a
POST request instead.  TIdHTTP has a Post() method for that.  Also, make
sure you are using the TIdMultiPartFormDataStream class as your post data.
It has AddFormField() and AddFile() methods, and will format the posted data
to the server accordingly.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03



In response to

File sending.. posted by Alexander Adam on Tue, 26 Aug 2003