Re: newbie : Http upload

Giganews Newsgroups
Subject: Re: newbie : Http upload
Posted by:  Remy Lebeau (TeamB) (gambit…
Date: Fri, 12 Sep 2003

"TheBigBadWolf" <wolfganglechnerPLEA…> wrote in message

> Downloading is ok : client.get and server.oncommandget
> But how does upload work?

Client calls Post() using a TIdMultiPartDataStream containing the file data.
The server's OnCommandGet event will still trigger, and you can access the
data using the ARequestInfo.PostStream property.  You should probably also
use the OnCreatePostStream event as well, otherwise TIdHTTPServer will
default to using TStringStream for the PostStream, which may or may not be
the correct type of stream to use for the data you are receiving.  You can
use the OnCreatePostStream event handler to provide your own TMemoryStream
or TFileStream, for example.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03



In response to

newbie : Http upload posted by TheBigBadWolf on Fri, 12 Sep 2003