That did the trick.
Thanks Peter for the quick response.

Ed

----- Original Message ----- From: "Busai Péter" <busai...@t-online.hu>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Wednesday, January 26, 2011 5:25 PM
Subject: Re: [twsocket] sending jpg through httpserver


Hi Edwin,

AnswerStream is just perfect for that.
Here is how I send png. It is stored in FpngStream, which is also a
TMemoryStream.
I dont want it to be destroyed after sent. That is why I create an other
memory stream and copy
then content.

ClientCnx.DocStream := TMemoryStream.Create;
ClientCnx.DocStream.CopyFrom(TSessionData(SessionList[index]).FpngStream,0);
ClientCnx.AnswerStream(Flags,'','image/png','');

Peter

2011.01.26. 22:53 keltezéssel, Edwin @ Clanhay írta:
I am trying to send a jpg from delphi's tjpgImage to a client with the tHTTPServer component. Would like to keep it in a memory stream and not save to disk, but AnswerStream is not what it sounds like.
Searched the archives but found little that was close to what I wanted.
Still using ICS 5.

Any ideas?

ed

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to