im trying to upload a file into ftp with the Append value TRUE, now, when i force abort the upload, disconnect then i connect back, i start the upload from 0% again.. why is it like that?
here is my code:
//it shows the progress of the upload plus it got force aborting the transfer after 60 seconds..
procedure TFTPSaveThread.OnFTPWork(ASender: TObject; AWorkMode: TWorkMode;AWorkCount: Int64);
begin
ProgressCurrent := AWorkCount;
if (LastSecond+(1000*60)<=GetTickCount) and (ProgressBax <> ProgressCurrent) then begin
LastSecond := GetTickCount;
[URL="ftp://ftp.abort/"]FTP.Abort[/URL];
[URL="ftp://ftp.quit/"]FTP.Quit[/URL];
QuitTransfer := True;
end;
end;
and the FTP put loop it self:
//it repeats until the upload is finished..
repeat
Progress := 3;
LastSecond := GetTickCount;
try
[URL="ftp://ftp.Put(SaveLocalPath,SavePath+SaveName,True"]FTP.Put(SaveLocalPath,SavePath+SaveName,True[/URL]);
except
end;
if QuitTransfer then
begin
[URL="ftp://ftp.Disconnect"]FTP.Disconnect[/URL];
[URL="ftp://ftp.Connect"]FTP.Connect[/URL];
QuitTransfer := False;
end else FinishedUp := True;
until FinishedUp = True;
so where i've been wrong anyone?


Sign In
Create Account


Back to top









