How does Resume feature work? - WeOnlyDo Discussion board

How does Resume feature work? (General questions)

by Sumit, Wednesday, July 07, 2004, 15:46 (7226 days ago)

Hi,
I've developed a client application in VB6 which uploads files. Before I upload the files I set the Resume property to True. But in the middle of the upload, if the connection with the server breaks, on reconnecting with the server, the upload is not resumed. Can someone please let me know how this property works, and which is the right place to set it to true?
Thanks.
Sumit.

Re: How does Resume feature work?

by wodSupport, Wednesday, July 07, 2004, 15:56 (7226 days ago) @ Sumit

Hi,

Resume should work correctly, and we didn't have support request for it not working so far. So, can you please give me more info about this. What kind of server (vendor) are you using? Before you try to resume, can you check filesize from previous session if server did actually save any bytes, or it truncated file?

Thanks.

Re: How does Resume feature work?

by wodSupport, Thursday, July 08, 2004, 00:06 (7226 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.

Re: How does Resume feature work?

by Sumit, Thursday, July 08, 2004, 13:36 (7225 days ago) @ wodSupport

Hi,
Thanks a lot! Actually the size of my application is huge with many forms,and it does a lot more than SFTP. So it was tough to figure out where I was at fault, which I did by the time I got this piece of code from you. Thanks again for the support. This feature was of utmost priority for us. I've passed the message to my management. We'll surely get back to you.
Keep it up.