Reputation: 1232
I am working an application which needs to upload files to server. I am using delphi and TIDFtp to upload files.
Everything works ok, except the file name after upload is randomly generated. The file in my machine is named
test.txt
and after upload its named in the server like
How to fix this ?
Here is my code :
IdFtp1.Host := 'host';
IdFtp1.Username := 'uname';
IdFtp1.Password := 'pass';
IdFtp1.Connect;
IdFtp1.Put('test.txt');
IdFtp1.Disconnect;
Upvotes: 3
Views: 622
Reputation: 36634
Indy Put method has a two-argument version
Try this
IdFtp1.Put('test.txt', 'remote-file.txt');
Upvotes: 4