Sub Class_Globals
Dim FTP as FTP
Dim filesize as Long
End Sub
Sub uploadFile(dir As String, filename As String, hostPath as string)
filesize = Round(File.Size(dir, filename))
FTP.UploadFile(dir, filename, False, hostPath)
End Sub
Sub FTP_UploadProgress(hostPath As String, TotalUploaded As Long, Total As Long)
Log("Uploading..." & Round(TotalUploaded / filesize * 100) & "%")
End Sub
Sub FTP_UploadCompleted(hostPath As String, Success As Boolean)
If Success Then
Log("Finished")
Else
Log("Failed")
Log(LastException.Message)
End If
End Sub