Problems with my firt sFTP client

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
dwriedel
Posts: 8
Joined: Wed 20 Jan 2016 18:46

Problems with my firt sFTP client

Post by dwriedel » Wed 20 Jan 2016 19:13

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

dwriedel
Posts: 8
Joined: Wed 20 Jan 2016 18:46

Re: Problems with my firt sFTP client

Post by dwriedel » Wed 20 Jan 2016 19:19

Update:
Running OS Client Windows 7
Delphi 10 Seattle Version

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with my firt sFTP client

Post by ViktorV » Thu 21 Jan 2016 09:55

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);

dwriedel
Posts: 8
Joined: Wed 20 Jan 2016 18:46

Re: Problems with my firt sFTP client

Post by dwriedel » Fri 22 Jan 2016 11:49

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.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with my firt sFTP client

Post by ViktorV » Fri 22 Jan 2016 17:19

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

Post Reply