Re: How does Resume feature work? - WeOnlyDo Discussion board

Re: How does Resume feature work? (General questions)

by wodSupport, Thursday, July 08, 2004, 00:06 (7442 days ago) @ wodSupport

Sumit,

hi. Here's what I did - I created new VB project and put one button to it, and then used this code:
[code]
Option Explicit
Private WithEvents SFTP1 As wodSFTPCom

Private Sub Command1_Click()

SFTP1.HostName = XYZ
SFTP1.Login = XYZ
SFTP1.Password = XYZ
SFTP1.Resume = True
SFTP1.Connect
End Sub

Private Sub Form_Load()
Set SFTP1 = New wodSFTPCom
End Sub

Private Sub SFTP1_Connected(ByVal ErrorCode As Integer, ByVal ErrorText As String)
SFTP1.PutFile c:\test.file , /tmp
End Sub

Private Sub SFTP1_Progress(ByVal Position As Long, ByVal Total As Long)
Debug.Print Position & & Total
End Sub
[/code]

When upload started, I closed the application so upload was broken. Then I started it again, and clicked on the button. In debug window, progress didn't start from 0 again, but started from last position where it failed before.

This tells me Resume = True works correctly - can you paste me some code that doesn't work on your side? Can you try my code? Does it work for you? If you don't have a server to test with, let me know, I'll provide you with our test server.

Regards.


Complete thread: