0 votes
by (120 points)

I am trying to upload a file usinf memory stream.
I amd calling below function and passing memory stream and filename.
Bleow code executes OK without any exception, but file is not created.Am I missing something.

Dim asyncResult = ssh.PutFileAsync(ms, Filename)

Applies to: Rebex SFTP

1 Answer

0 votes
by (70.3k points)

The file is not created or it has zero length?

If zero length file is created, please ensure that ms.Position = 0 first.

If the file is not created at all, please post here or send to support@rebex.net debug communication log. It can be created like this:

ssh.LogWriter = New Rebex.FileLogWriter("c:\temp\ssh.log", Rebex.LogLevel.Debug)