I need a Upload automatically in the code below to send to the server via FTP using Delphi, is it possible?
var
ms: TMemoryStream;
begin
if OpenDialog1.Execute then
ms := TMemoryStream.Create;
idftp1.host := '' // Endereço do servidor FTP
idftp1.port := ''; //Porta do servidor FTP
idftp1.username := ''; // Parametro nome usuario servidor FTP
idftp1.password := ''; // Parametro senha servidor FTP
idftp1.Connect();
(Aqui Preciso mudar)
idftp1.Put(OpenDialog1.FileName, '/projeto_ftp/' + ExtractFileName(OpenDialog1.FileName));
IdFTP1.Disconnect;
end;