PutFile and stream problem (wodSFTP / wodSFTP.NET / wodSFTPdll)

by subcubes @, (7073 days ago)

Hi

Im trying to use PutFile, from a FileStream, like so:

FileStream fs = new FileStream(m_PutFiles[0].LocalFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);

m_SFTPPutFileInstance.PutFile(fs, m_PutFiles[0].RemoteDirName);


But it doesn't upload anything - and I don't get any Errors from DoneEvent. Im not using blocking.

Also, Ive surfed this forum to see if any other had the same issue - and thought I read something about, that ProgressEvent is not fired when I PutFile with a Stream, is this correct?

Regards
Torben Lajer

locked

Re: PutFile and stream problem

by Jasmine, (7073 days ago) @ subcubes

Torben,

Progress should fire.

Does your code work if you try to call PutFile with filename as argument?

If you don't use blocking mode, is it possible that wodSFTP is destroyed before it even starts uploading (i.e. if you declared it locally)?

locked

Re: PutFile and stream problem

by subcubes @, (7073 days ago) @ Jasmine

Does your code work if you try to call PutFile with filename as argument?

Yes, then it works without any problems.

No, Its not possible that wodSFTP is destroyed before uploading (ie. it works when I just use the filename as argument), I made fairly sure of that, by setting a member boolean to true when connected.

If nessasary, I could paste some code?

locked

Re: PutFile and stream problem

by Jasmine, (7073 days ago) @ subcubes

How about you zip your code and send it over to techsupport? I'm affraid code fragment will not help, I need to see the big picture .

locked