Android Question HOW TO CONTROL UPLOAD FILE USING HTTPUTILS

little3399

Active Member
Licensed User
Longtime User
HI,

If I upload files during using httputils2 lib an error occurred, such as network error ,socket timeout ...etc, How can I do to overcome these case ?


,
 
You get an Job.Success = false in such case... You need to react on this, then...
 
Upvote 0
Hi,DonManfred

I have some question about the HttpJob routine, for example during upload a large file , an error occurred ... and the file just upload a half ...,
and this case will be catch and HTTPJOB will return false ?
 
Upvote 0
In your description you wrote about network error ,socket timeout
Success will be false in JobDone then, yes. You can get the error with
Code: Copy
Job.ErrorMessage
in JobDone...

Code: Copy
Sub JobDone(Job As HttpJob)
    HideKeyboard
    ProgressDialogHide
    If Job.Success Then
        If Job.JobName = "AddToCart" Then
        Else
            ToastMessageShow(Job.JobName&": " & Job.GetString, True)
        End If
    Else
        ToastMessageShow("Error: " & Job.ErrorMessage, True)
    End If
    Job.Release
End Sub
 
Upvote 0
Back
Top