Presales help

your ftp lib is awesome .

i will be grateful if you can help me .
i build this code like your example

Private Sub upload_file_smartftp(local_name, onserver_file, 0, 0)

Dim nRestartLo: nRestartLo = 0
Dim nRestartHi: nRestartHi = 0
Dim strMsg As String
If objFTP.UploadFile(local_name, onserver_filw, nRestartLo, nRestartHi) = sfFTPLib.enumError.ftpErrorSuccess Then
strMsg = " Upload successful." & vbCrLf
strMsg = "uploadFile failed. LastError = " & objFTP.LastError & vbCrLf
Call resume_UploadFile(local_name, onserver_filw, local_size, bResume)
End If

End Sub

Private Sub resume_UploadFile(strLocalFile, strRemoteFile, local_size, bResume)

Dim nRestart: nRestart = 0 ' overwrite by default
Dim bSkip: bSkip = False ' don't skip, unless equal size
Dim nLocalFileSize: nLocalFileSize = local_size
Dim result

' Get Remote File Size
result = objFTP.GetFileSize(strRemoteFile)

If result = ftpErrorSuccess Then
Dim nRemoteFileSize: nRemoteFileSize = objFTP.LastFileSizeLo
If nLocalFileSize = nRemoteFileSize Then
bSkip = True
' MsgBox (" file equal")
nRestart = 0
ElseIf nLocalFileSize > nRemoteFileSize Then
' Only resume if local size is greater than remote size
nRestart = nRemoteFileSize
End If
End If

' UploadFile
result = objFTP.UploadFile(strLocalFile, strRemoteFile, nRestart, 0)
If result = ftpErrorSuccess Then
bResume = True
bResume = False
End If
End Sub

from some reason when i kick my connection the program start transfer from begining
i get 0 in result = objFTP.GetFileSize(strRemoteFile) even when i see this file in my browser and size>0
my server support resume (i try this in your client ftp 2 )
can you see any error in this code

Thank you for you patience

The GetFileSize functionh returns 0 if there is no error. The file size value is in the LastFileSize(Lo|Hi) property.

You should always call the resume_UploadFile function because the other one (upload_file_smartftp) will not resume your transfer.