procedure TForm1.Button1Click(Sender: TObject);
var
t: cardinal;
sm: TMemoryStream;
begin
t := gettickcount;
sm := TMemoryStream.Create;
sm.LoadFromFile('c:\0001.jpg');
ftp.HostName := '127.0.0.1';
sm.Position := 0;
ftp.LocalStream := sm;
//ftp.LocalFileName := 'c:\0001.jpg';
ftp.UserName := 'ftp';
ftp.PassWord := '1';
ftp.HostFileName := '/1.jpg';
ftp.Connect;
ftp.put;
ftp.Quit;
sm.Free;
caption := inttostr(gettickcount-t);
end;