Re: newbie : Http upload

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

"TheBigBadWolf" <wolfganglechnerPLEA…@NOSPAMgmx.at> wrote in message
news:F7FD38888E7EE240wolfganglechnerPLEA…@NOSPAMgmx.at...

> 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.

Gambit

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

Replies

None

In response to

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