Zip Files - WeOnlyDo Discussion board

Zip Files (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Jasmine, Thursday, September 28, 2023, 07:09 (212 days ago) @ Dave

Hi.

When you say "i did all the code changes requested", who did request those changes? Your code is more/less ok. You should not use Sleep since you block the thread where wodSFTP lives, tho. However, in your specific changes, since Blocking = True, it does not make a difference since blocking calls (Connect, PutFile) stop your execution until they are complete, and then give control back to you anyway.

Anyway, can you remove all of your code and try simple

sftp1 = new wodSFTPCom
sftp1.Hostname = "something"
sftp1.Login = "something"
sftp1.Password = "something" // change this to key authentication if you use it
sftp1.Blocking = true

sftp1.Connect
sftp1.PutFile ......

Those are only required lines to connect and upload file. Your other app's logic could be moved outside of the function that connects to SFTP server.

If above code fails, can you tell me exact error you're getting?

Regards,
Jasmine


Complete thread: