How to upload a Delphi stream via FTP with TclUploader

procedure TfmUploader.btUploadClick(Sender: TObject);   
begin   
   if clUploader1.IsBusy then Exit;   
   Memory := TStringStream.Create('test data');   
   clUploader1.DataStream := Memory;   
 
   clUploader1.UserName := 'test';   
   clUploader1.Password := 'test';   
   clUploader1.URL := 'ftp://myserver.com/testdata.txt';   
   clUploader1.Start();   
end;    
 
 
procedure TfmUploader.clUploader1ProcessCompleted(Sender: TObject);   
begin   
   clUploader1.DataStream := nil;   
   Memory.Free();   
end;   
 
 

Add Feedback