How do you use the sub FileUploadCompleted ?
I wrote
B4X:
Sub SSH_FileUploadCompleted(Success As Boolean, RemoteFile As String, LocalTargetDirectory As String, TaskId As Int)
If Success=True Then
msgbox ("OK","")
Else
End If
End Sub
but it appears the error :
An error has occured in sub: java.lang.Exception: Sub ssh_fileuploadcompleted signature does not match expected signature
I dont know (not using this lib) but i guess it should be something like
B4X:
Sub SSH_FileUploadCompleted(Success As Boolean, LocalFile As String, RemoteTargetDirectory As String, Mode As String, TaskId As Int))
If Success=True Then
msgbox ("OK","")
Else
End If
End Sub
Thank you for quick response. I realized that you can read the XML file libraries and obtain useful information.
However, there remains the error !
Precise that the similar function SSH2.getFile working properly. putFile call like this:
B4X:
If (File.Exists(File.DirRootExternal,"config.txt")) Then
SSH2.putFile (File.DirRootExternal & "/config.txt","/home/UGO","0666" ,22)
Else
Msgbox ("no","")
End If
B4X:
Sub SSH_FileUploadCompleted(Success As Boolean, LocalFile As String, RemoteTargetDirectory As String, TaskId As Int)
Msgbox ("upload completato","")
Dim C As String
C="config.txt"
If Success=True Then
File.Delete (File.DirRootExternal ,C)
ExitApplication
Else
End If
End Sub
I apologize. I read your intervention on my smartphone and I had not done too much attention; it seemed that there were no significant changes compared to what I had written myself.
I was wrong. Now everything is OK and the procedure works!
I hope you keep in mind that there is need of the most experienced and continue to improve.
Sorry again; also for my bad English.