Zip Files (wodSFTP / wodSFTP.NET / wodSFTPdll)
Is your product unable to upload zip files with SSH by chance?
Dave
by Dave M, (766 days ago)
Is your product unable to upload zip files with SSH by chance?
Dave
by Jasmine, (766 days ago) @ Dave M
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
by Dave  ,  (765 days ago) @ Jasmine
,  (765 days ago) @ Jasmine
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.
by Dave  ,  (765 days ago) @ Dave
,  (765 days ago) @ Dave
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.KeysSFTPUpload.Disconnect
SFTPUpload.Blocking = True 'Tried setting this to false and it still failedSFTPKey.Load Trim(PrivateKey.ppk), fstrDLXPass 'Note the file name is a parameter we send in
SFTPUpload.HostName = fstrDLXIPAddress
SFTPUpload.Authentication = authPubkey
SFTPUpload.Login = fstrDLXUserNameSFTPUpload.PrivateKey = SFTPKey.PrivateKey(RSAkey)
SFTPUpload.Timeout = 0
SFTPUpload.KeepAlives = 240 ' change from 60 to 120 to 240 - All Failed
SFTPUpload.Resume = True ' This was addedSFTPUpload.Connect
If SFTPUpload.State <> Connected Then
Call TimeBetweenAttempts(10) 'Give the process 10 seconds to connect
End IfDo 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
LoopIf 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 IfWe 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.
Sorry - I did not note - we are using wodSFTP.dll (our version - 3.8.7.220)
by Jasmine, (765 days ago) @ Dave
Hi.
When you say "i did all the code changes requested", who did request those changes? Your code is more/less ok. You should not use Sleep since you block the thread where wodSFTP lives, tho. However, in your specific changes, since Blocking = True, it does not make a difference since blocking calls (Connect, PutFile) stop your execution until they are complete, and then give control back to you anyway.
Anyway, can you remove all of your code and try simple
sftp1 = new wodSFTPCom
sftp1.Hostname = "something"
sftp1.Login = "something"
sftp1.Password = "something" // change this to key authentication if you use it
sftp1.Blocking = true
sftp1.Connect
sftp1.PutFile ......
Those are only required lines to connect and upload file. Your other app's logic could be moved outside of the function that connects to SFTP server.
If above code fails, can you tell me exact error you're getting?
Regards,
Jasmine
by Dave, (764 days ago) @ Jasmine
Hi.
When you say "i did all the code changes requested", who did request those changes? Your code is more/less ok. You should not use Sleep since you block the thread where wodSFTP lives, tho. However, in your specific changes, since Blocking = True, it does not make a difference since blocking calls (Connect, PutFile) stop your execution until they are complete, and then give control back to you anyway.
Anyway, can you remove all of your code and try simple
sftp1 = new wodSFTPCom
sftp1.Hostname = "something"
sftp1.Login = "something"
sftp1.Password = "something" // change this to key authentication if you use it
sftp1.Blocking = truesftp1.Connect
sftp1.PutFile ......Those are only required lines to connect and upload file. Your other app's logic could be moved outside of the function that connects to SFTP server.
If above code fails, can you tell me exact error you're getting?
Regards,
Jasmine
Jasmine
I made all the code adjustments - I already posted on the forum. I was grasping at straws at this point.
I made the changes you suggested and it worked. It's not working consistently. I think at this point it's really the server and not the wodSFTP.dll or my code. I literally made the code the same as you suggested and it worked.
Question: After the PutFile, how do we see if an error came back without declaring the wodSFTPCom with a With Events option?
Dave
by Jasmine, (764 days ago) @ Dave
Hi Dave,
if you want to use events, make sure you do NOT set Blocking = true, since this is different approach (in async way) to wodSFTP's behavior. So either use events with blocking = false, or don't use events with blocking = true.
If you use events, check out arguments passed when event was fired for specific error, especially in the Done event.
Regards,
Jasmine
by Dave, (763 days ago) @ Jasmine
Jasmine
I tried that with events. The problem is it freezes at the PutFile and does not move to any next line.
I am going to check within the week. I think the last change worked. Unfortunately, the person I am working with is out of the office. If I have further issues, I'll send a new post.
Dave
Hi Dave,
if you want to use events, make sure you do NOT set Blocking = true, since this is different approach (in async way) to wodSFTP's behavior. So either use events with blocking = false, or don't use events with blocking = true.
If you use events, check out arguments passed when event was fired for specific error, especially in the Done event.
Regards,
Jasmine

...with the SFTP interface you produced, everything was so simple to understand, we were able to start coding almost immediately!

...not only that you provide these components at very reasonable cost, your responsiveness to emailed technical questions is simply outstanding...

Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.

Just thought you'd like to know that my gateway app with your SMTP Server component held the line against a DDOS attack today...

Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.

Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.

Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.

Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.

...what I really like is that wodSSH and wodSFTP components work excellently and are constantly being improved...

Your professionalism is reflected into your email, your product and your web site. I am confident that these will make the difference.

