Sub JobDone (JobStatus As HttpJob)
If (JobStatus.Success=True And JobStatus.GetString.Contains("error")<>True) Then
If(JobStatus.JobName="Logo") Then
Log(DBFilePath)
Log(HTTPInlog.GetBitmap)
Log("Ja")
If(JobStatus.GetBitmap.Width<>0) Then
' Thats the name of this special download we created using the Tag-Property
Dim OutStream As OutputStream
Log("DownloadReady: "&JobStatus.Tag)
OutStream = File.OpenOutput(DBFilePath, "logo2.jpg", False) ' Job.Tag is read to set the Original Filename we specify earlier in the creation of the Job
JobStatus.GetBitmap.WriteToStream(OutStream,100,"JPEG")
OutStream.Close
Dim InStream As InputStream
InStream = File.OpenInput(DBFilePath,"logo2.jpg")
Log(InStream.BytesAvailable)
InStream.Close
Log("file://"&DBFilePath&"/logo2.jpg")
Log(JobStatus.Tag&" are written to "&DBFilePath) ' Write the Originalname to the log to see what happens ;-)
End If
End If
Else
Log("Fout")
Msgbox("Er is een fout in de communicatie. Programma wordt gestopt.","")
HTTPInlog.Release
Activity.Finish
End If
End Sub