Sub JobDone (job As HttpJob)
Dim t As String
If job.Success = True Then
Select job.JobName
Case "dnld":
't=job.GetString
' t is a very long string, completely illegible, looks like random
'log (t)
' system says that t is too big
Dim OutStream As OutputStream
Log("DownloadReady: "&job.Tag)
OutStream = File.OpenOutput(File.DirRootExternal, job.Tag, False) ' Job.Tag is read to set the Original Filename we specify earlier in the creation of the Job
File.Copy2(job.GetInputStream,OutStream) ' save the file
OutStream.Close
Log(job.Tag&" written to "&File.DirRootExternal) ' Write the Originalname to the log to see what happens ;-)
If File.Exists (Main.outdir, fname) = False Then
Basis.debuginfo ("exiting",False)
Return
' the program comes to here
End If