Page 1 of 1

Problems with my firt sFTP client

Posted: Wed 20 Jan 2016 19:13
by dwriedel
Hello at all,

these are my first steps with SecureBridge.

Based on this posting http://forums.devart.com/viewtopic.php?t=21779, I tried to create my first sftp client.

I can connect to server, but the upload is failing since the client could not find the local rescource :(
The client should be able to fetch the file. the file is present at local directory. Even if I execute with administrator privilegies and rights I am failing ....

here the screenshot...
Image
Link to screenshot http://www.youscreen.de/dcbjbobg36.jpg


To reproduce my pitfall, here is the full source code:
http://www.myduesseldorf.de/devart/SFTPClientDemo.zip

Thanks in advance for helping
Dorian

Re: Problems with my firt sFTP client

Posted: Wed 20 Jan 2016 19:19
by dwriedel
Update:
Running OS Client Windows 7
Delphi 10 Seattle Version

Re: Problems with my firt sFTP client

Posted: Thu 21 Jan 2016 09:55
by ViktorV
In the sample you have provided, the fill name of the transferred file is cfile.txt.txt, not cfile.txt. To make your code work correctly, please replace the line

Code: Select all

 ScSFTPClient.UploadFile('cfile.txt', 'cfile.txt', False); 
with

Code: Select all

ScSFTPClient.UploadFile('cfile.txt.txt', 'cfile.txt', False);

Re: Problems with my firt sFTP client

Posted: Fri 22 Jan 2016 11:49
by dwriedel
Thanks for the quick reply.
:oops: Just ignoring the windows folder options.

I guess with the events "OnError" and "OnSuccess" I can determine a succesful upload.

Re: Problems with my firt sFTP client

Posted: Fri 22 Jan 2016 17:19
by ViktorV
It is good to see that the problem has been solved.
Yes, you can use OnSuccess and OnError event handlers to get the result of file upload operation. See more details about these event handlers in SecureBridge help: https://www.devart.com/sbridge/docs/tsc ... nerror.htm, https://www.devart.com/sbridge/docs/tsc ... uccess.htm