Article View: borland.public.cppbuilder.internet.socket
Article #2549Re: Progress bar for FTP
From: David Ayre
Date: Sat, 25 Mar 2006 18:05
Date: Sat, 25 Mar 2006 18:05
40 lines
2252 bytes
2252 bytes
Thanks Remy, That's great. These Indy components are really good when you get to understand them. Cheers, David "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: > >"David Ayre" <davidcayre@ntlworld.com> wrote in message >news:44241e78$1@newsgroups.borland.com... > >> I'm using the Indy 9 IdFTP component and it is now working >> very nicely. However, it would be nice to have a progress bar >> to show the progress of the upload or download. > >That is what the OnWork... events are for. The OnWorkBegin event tells you >when a transfer is beginning, and how much data is going to be transferred. >The OnWork event tells you the progress of the transfer. The OnWorkEnd >event tells you when the transfer finishes. > >Keep in mind, however, that the FTP protocol does not send the file size >during a transfer. So when you use the Get() method to download a file from >the server, the OnWorkBegin event will not be able to tell you the size of >the file that is being transferred. You will have to determine the file's >size before calling Get(), such as with a directory listing or with the >Size() method. > >Uploading files, on the other hand, will always report the correct file size >in the OnWorkBegin event, since it uses the size of the stream that is used >for the transfer. > > >Gambit > >
Technical Details
Message-ID:
<44259464$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44241e78$1@newsgroups.borland.com> <44244d53$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3c25158ce52e9813 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "David Ayre" <davidcayre@ntlworld.com> Sender: "David Ayre" <davidcayre@ntlworld.com> Reply-To: "David Ayre" <davidcayre@ntlworld.com> Subject: Re: Progress bar for FTP Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 62.252.224.18 X-Forwarded-For: 86.14.92.125 References: <44241e78$1@newsgroups.borland.com> <44244d53$3@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <44259464$1@newsgroups.borland.com> Date: 25 Mar 2006 11:05:08 -0700 X-Trace: newsgroups.borland.com 1143313508 207.105.83.66 (25 Mar 2006 11:05:08 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail