Re: Resume function not correctly download my file - WeOnlyDo Discussion board

Re: Resume function not correctly download my file (General questions)

by rossi, Tuesday, July 25, 2006, 07:35 (6696 days ago) @ wodDrazen

Hello Drazen,

I found something interest after trying the wodftp sample in Delphi. Yes, I'm using delphi 7.

I try to download movie file whose size is 90mb, and put new button on form to simulate abort function(ftpdlx1.Abort). Then checked resume and blocking checkedbox, then connect and download file. In the middle of downloading process, I pressed abort button, I wish it can represents a bad connection condition. Then I quit, and run the program again. And resume download process, in the end of process (stated by progress bar status), it raises floating point division by zero . And the downloaded filesize always becoming 1-2kb bigger then it should be,and it made the movie cannot be played well.

Other things that also interesting is, when I replace OnProgress event using these code :

procedure TForm1.ftpdlx1Progress(ASender: TObject; Position,
Total: Integer);
begin
pb1.Position:= Position;
pb1.Max:= Total;
end;

Then, it will not raise that exception anymore, but, in the end of process, downloaded file size becoming = originil_file_size + stopped_file_size. I mean, if I press abort button after the program download 5mb, in the end of process, it will be = 95mb


Complete thread: