首先 去查看已经上传文件的大小
LastTimeTransfer := IdFtp1.Size(StrPas(FileName));
然后
LSourceStream := TFileStream.Create(StrPas(FTask.LocalFileName), fmOpenRead or fmShareDenyNone);
LSourceStream.Seek(LastTimeTransfer, 0);
IdFtp1.Put(LSourceStream, StrPas(FTask.FileName), bResu);
//////
procedure TIdFTP.Put(const ASource: TStream; const ADestFile: string = '';
const AAppend: boolean = false);
begin
if length(ADestFile) = 0 then
begin
InternalPut('STOU ' + ADestFile, ASource); {Do not localize}
end
else
if AAppend then
begin
InternalPut('APPE ' + ADestFile, ASource); {Do not localize}
end
else
begin
InternalPut('STOR ' + ADestFile, ASource); {Do not localize}
end;
end;
我已经实现此功能了,希望对你有帮助