Android Question Getting upload progress with HttpJob's PostFile

Kwame Twum

Active Member
Licensed User
Longtime User
I'd like to know how to get progress of an upload done via PostFile
Here's my current code:
B4X:
Sub PushFile(Dir,FName)
    Dim mj As HttpJob
    Dim url As String = "http://myurl.com/uploads.php?filename=" & FName
    mj.Initialize("upl", Me)
    mj.Tag = filename
    mj.PostFile(url,Dir,FName)
End Sub

Sub JobDone(Job as HttpJob)
    If Job.Success Then
        Select Job.JobName
           Case "upl"
              Dim jt As String = Job.tag
              Log("upload complete for: " & jt)
        End Select
    End If
    Job.Release
End Sub
Thanks in advance for helping.
 
Top