B4J Question SFTP and Wait for

imbault

Well-Known Member
Licensed User
Hi,
Is there a way to do a wait for using SFTP, because I do not see any return object in the oSFTP.UploadFile ?

Thanks
 

imbault

Well-Known Member
Licensed User
FTP.UploadFile returns an object, which is not the case of oSFTP.UploadFile
 

MarkusR

Well-Known Member
Licensed User
should be an event UploadCompleted,
so you would wait for this event.
UploadFile (DeviceFolder As String, DeviceFile As String, ServerFilePath As String)
Uploads a file to the server. The UploadCompleted event will be raised when upload completes.
UploadProgress events will be raised during the upload.
DeviceFolder - Local folder.
DeviceFile - Local file name.
ServerFilePath - Full path to file that will be created on the server.
https://www.b4x.com/b4j/help/jsch.html#sftp_uploadfile
 

Erel

Administrator
Staff member
Licensed User
You can always wait for events, even if there is no "sender filter" object.

B4X:
SFTP.UploadFile(...)
Wait For SFTP_UploadCompleted (...)
This will work as long as you are not trying to upload multiple files at once. In that case only the last event will be raised.
 

imbault

Well-Known Member
Licensed User
Sorry Erel, what kind of paramaters do I have to put in (....) for
Wait For SFTP_UploadCompleted (...)
?

Thanks
 

Enrique Gonzalez R

Well-Known Member
Licensed User
Sorry Erel, what kind of paramaters do I have to put in (....) for
Wait For SFTP_UploadCompleted (...)
?

Thanks
you can use the TAB key to enter the library events as if you were creating a new sub. anyway it is exactly the same parameters (you can change names of them) as a regular sub
 
Top