I have to upload a text file on my android project and so I used the IdFTP. This is the code:
Button2.Enabled:=False;
Label5.Text:='Uploading...';
Memo1.Lines.Add(Edit1.Text+':'+ComboBox1.Items.Text);
Memo1.SaveToFile('filehost.txt');
try
IdFTP1.Connect;
// I set the host, password and username
IdFTP1.Put('filehost.txt');
finally
IdFTP1.Disconnect;
I am having a problem because when I run the app on my Samsung (Android 2.3) I have an error that says Cannot create file "/filehost.txt". Not a directory.
I must save the content of that Memo1 in my Android device and then upload it using the IdFTP. How can I do it avoiding that error?