[twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst

Hello all,

when I use Http Post Web to send file,
if the file is bigger as 100mb.
because content must has some FormField to post,
I use MemorrStream write these information and
FileStream.
when I load to TMemoryStream it will cause my computer
slow to build MemoryStream, can I use other mothods to
resolve this problem?


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Paul

You should use a TFileStream instead of a TMemorystream.

Paul



- Original Message - 
From: Opqrst Ghrst [EMAIL PROTECTED]

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 19, 2006 10:37 AM
Subject: [twsocket] HTTP POST - SendStream With TMemoryStream




Hello all,

when I use Http Post Web to send file,
if the file is bigger as 100mb.
because content must has some FormField to post,
I use MemorrStream write these information and
FileStream.
when I load to TMemoryStream it will cause my computer
slow to build MemoryStream, can I use other mothods to
resolve this problem?


___
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk








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


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

回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst
hello

I try to use FileStrem, it must has Free Space to
create the same size of File,but it should be better
than TmemoryStream, if teh file is biger.

HttpCli-ContentTypePost=multipart/form-data;
boundary=---7d5168231620eb2;
Buf1=-7d5168231620eb2\r\nContent-Disposition:
form-data; name=fname+;
filename=+key+\r\nContent-Type:
application/octet-stream\r\n\r\n;
Buf2==-7d5168231620eb2--

SendStream=new TFileStream(temp, fmCreate);
SendStream-Size=0;
SendStream-WriteBuffer(Buf1.c_str(), Buf1.Length());
TFileStream* ms=new
TFileStream(Filepath.c_str(), fmOpenRead);
SendStream-CopyFrom(ms,ms-Size);
delete ms;
SendStream-WriteBuffer(Buf2.c_str(), Buf2.Length());
SendStream-Seek(0, soFromBeginning);



--- Paul [EMAIL PROTECTED] 說:

 You should use a TFileStream instead of a
 TMemorystream.
 
 Paul
 
 
 
 - Original Message - 
 From: Opqrst Ghrst [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, January 19, 2006 10:37 AM
 Subject: [twsocket] HTTP POST - SendStream With
 TMemoryStream
 
 
 
  Hello all,
 
  when I use Http Post Web to send file,
  if the file is bigger as 100mb.
  because content must has some FormField to post,
  I use MemorrStream write these information and
  FileStream.
  when I load to TMemoryStream it will cause my
 computer
  slow to build MemoryStream, can I use other
 mothods to
  resolve this problem?
 
 
  ___
  YM - 離線訊息
 

就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
  http://messenger.yahoo.com.hk
 
 
 


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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Francois PIETTE

when I use Http Post Web to send file,
if the file is bigger as 100mb.
because content must has some FormField to post,
I use MemorrStream write these information and
FileStream.
when I load to TMemoryStream it will cause my computer
slow to build MemoryStream, can I use other mothods to
resolve this problem?


If you use TMemoryStream, then your 100MB of data is loaded onto RAM which 
can be slow. Use another kind of TStream, for example a TFileStream which 
store his data in a disk file instead of RAM.


--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


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

回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst
thanks F.P.

I See,
but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost=multipart/form-data mothod
post. 

--- Francois PIETTE [EMAIL PROTECTED] 說:

  when I use Http Post Web to send file,
  if the file is bigger as 100mb.
  because content must has some FormField to post,
  I use MemorrStream write these information and
  FileStream.
  when I load to TMemoryStream it will cause my
 computer
  slow to build MemoryStream, can I use other
 mothods to
  resolve this problem?
 
 If you use TMemoryStream, then your 100MB of data is
 loaded onto RAM which 
 can be slow. Use another kind of TStream, for
 example a TFileStream which 
 store his data in a disk file instead of RAM.
 
 --
 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 http://www.overbyte.be
 
 
  -- 
 To unsubscribe or change your settings for TWSocket
 mailing list
 please goto
 http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Francois PIETTE

but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost=multipart/form-data mothod
post.


Then you must program a little bit trickier: Create your own TStream derived 
class. The HTTP component will read data thru this stream interface. In the 
implementation, you are free to add your form field values and then read the 
file from disk and then add the end of data.


btw: You name in the mail message is very strange seen from here. I read 
Opqrst Ghrst. Probably you use some chinesee character set ? Maybe you 
should use US-ascii characters instead of unicode.


--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: Opqrst Ghrst [EMAIL PROTECTED]

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 19, 2006 8:16 PM
Subject: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream



thanks F.P.

I See,
but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost=multipart/form-data mothod
post.

--- Francois PIETTE [EMAIL PROTECTED] 說:


 when I use Http Post Web to send file,
 if the file is bigger as 100mb.
 because content must has some FormField to post,
 I use MemorrStream write these information and
 FileStream.
 when I load to TMemoryStream it will cause my
computer
 slow to build MemoryStream, can I use other
mothods to
 resolve this problem?

If you use TMemoryStream, then your 100MB of data is
loaded onto RAM which
can be slow. Use another kind of TStream, for
example a TFileStream which
store his data in a disk file instead of RAM.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


 -- 
To unsubscribe or change your settings for TWSocket

mailing list
please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



___
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
http://messenger.yahoo.com.hk








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


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

Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Dan
Derive your own stream, probably best to be from TFilestream, but add a 
header property or something.  Then override the seek and read methods (I 
think) to either seek into the file or into your header, and to read 
appropriate data.


Dan

- Original Message - 
From: Opqrst Ghrst [EMAIL PROTECTED]

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 19, 2006 7:16 PM
Subject: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream


thanks F.P.

I See,
but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost=multipart/form-data mothod
post.

--- Francois PIETTE [EMAIL PROTECTED] 說:


 when I use Http Post Web to send file,
 if the file is bigger as 100mb.
 because content must has some FormField to post,
 I use MemorrStream write these information and
 FileStream.
 when I load to TMemoryStream it will cause my
computer
 slow to build MemoryStream, can I use other
mothods to
 resolve this problem?

If you use TMemoryStream, then your 100MB of data is
loaded onto RAM which
can be slow. Use another kind of TStream, for
example a TFileStream which
store his data in a disk file instead of RAM.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


 -- 
To unsubscribe or change your settings for TWSocket

mailing list
please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



___
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。 
http://messenger.yahoo.com.hk
 -- To unsubscribe or change your settings for TWSocket mailing list please goto 
http://www.elists.org/mailman/listinfo/twsocket Visit our website at 
http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Wilfried Mestdagh
Hello,

I have started a new thread for this, because this one is a reply of
Sending 7 Kilobytes of data whitch I was interested to follow and this
one is not my 100% interest or knowledge. Please answer to the new
thread only.

Many modern email readers can sort on thread whitch is very nice, so
please if you do not have such email reader try to respect this :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 19, 2006, 21:22, Dan wrote:

 Derive your own stream, probably best to be from TFilestream, but add a
 header property or something.  Then override the seek and read methods (I
 think) to either seek into the file or into your header, and to read 
 appropriate data.

 Dan

 - Original Message - 
 From: Opqrst Ghrst [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, January 19, 2006 7:16 PM
 Subject: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream


 thanks F.P.

 I See,
 but if the file is more than 1 GB, That will cost my
 too mush disk free space,I am confuse on this problem,
 because I must add Form Field Value information on the
 Head of the data and boundary end of data.it will be
 work by ContentTypePost=multipart/form-data mothod
 post.

 --- Francois PIETTE [EMAIL PROTECTED] 說:

  when I use Http Post Web to send file,
  if the file is bigger as 100mb.
  because content must has some FormField to post,
  I use MemorrStream write these information and
  FileStream.
  when I load to TMemoryStream it will cause my
 computer
  slow to build MemoryStream, can I use other
 mothods to
  resolve this problem?

 If you use TMemoryStream, then your 100MB of data is
 loaded onto RAM which
 can be slow. Use another kind of TStream, for
 example a TFileStream which
 store his data in a disk file instead of RAM.

 --
 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 http://www.overbyte.be


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


 ___
  YM - 離線訊息
 
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
 -- To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket Visit our
 website at http://www.overbyte.be

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