Zip Files (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi Dave,
wodSFTP does not go into inspection of files in any way - whatever is provided for upload is uploaded as data. So, ZIP or any other file type should be uploaded normally.
What kind of issues are you having?
Regards,
Jasmine
I cannot upload a file consistently using the wodSFTP. I did all the code changes requested. I got the vendor on the phone and we discussed it. I have looked through your website. It connects and drops before the upload happens is the only thing I can think is happening.
Code:
Set SFTPUpload = New wodSFTPCom
SFTPUpload.LicenseKey = "****-****-****-****"
Set SFTPKey = New WODSSHKeyLib.Keys
SFTPUpload.Disconnect
SFTPUpload.Blocking = True 'Tried setting this to false and it still failed
SFTPKey.Load Trim(PrivateKey.ppk), fstrDLXPass 'Note the file name is a parameter we send in
SFTPUpload.HostName = fstrDLXIPAddress
SFTPUpload.Authentication = authPubkey
SFTPUpload.Login = fstrDLXUserName
SFTPUpload.PrivateKey = SFTPKey.PrivateKey(RSAkey)
SFTPUpload.Timeout = 0
SFTPUpload.KeepAlives = 240 ' change from 60 to 120 to 240 - All Failed
SFTPUpload.Resume = True ' This was added
SFTPUpload.Connect
If SFTPUpload.State <> Connected Then
Call TimeBetweenAttempts(10) 'Give the process 10 seconds to connect
End If
Do While SFTPUpload.State <> Connected
Sleep 1000
lintAttempts = lintAttempts + 1
If SFTPUpload.State = Connected Then Exit Do
If lintAttempts = 25 Then 'This was added so we can reconnect - never hit
SFTPUpload.Disconnect
GoTo RetryUpload
End If
If lintAttempts = 35 Then
MsgBox "Could not Connect to Processor ", vbOKOnly + vbInformation, "Upload File"
SFTPUpload.Disconnect
Exit Sub
End If
Loop
If Err <> 0 Then
MsgBox Err.Description, vbCritical, "Connect"
Err.Clear
Exit Sub
Else
lblFileUploaded.Caption = "Connecting to Processor..."
lblFileUploaded.Refresh
SFTPUpload.PutFile lstrLocalFile, fstrRemoteDir
End If
We get to the PutFile line without an issue and acts like the file is uploaded and it is not.
We can upload using this code. We did that yesterday. Today - 4 times it failed.
I am thinking it is on the server side.
Complete thread: