Sub btnDownloadPublic_Click
Dim cs As CountingOutputStream 'RandomAccessFile library
cs.Initialize(File.OpenOutput(File.DirInternal, "1.png", False))
Starter.storage.DownloadStream("/public/Untitled.png", cs)
Dim stop() As Boolean = Array As Boolean(False)
MonitorDownload(cs, stop)
Wait For Storage_DownloadCompleted (ServerPath As String, Success As Boolean)
stop(0) = True
If Success Then
Log("download successfully")
End If
End Sub
Sub MonitorDownload(cs As CountingOutputStream, stop() As Boolean)
Do While stop(0) = False
Sleep(200)
Log(cs.Count) '<-----
Loop
End Sub