Jump to content

Indy FTP Help..

- - - - -

  • Please log in to reply
No replies to this topic

#1
gogetax1

gogetax1

    Newbie

  • Members
  • PipPip
  • 14 posts
hey all, i've been using lately Indy's FTP Client.. and it seems like i little bit stuck there..
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?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users