dim f as string ="http://xxx.xxx./picture.jpg" ' file is successfully downloaded
Dim dirx As String = File.DirInternal
Dim job As HttpJob
job.Initialize("", Me)
job.Download(f)
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Dim out As OutputStream = File.OpenOutput(dirx, newname, False)
File.Copy2(job.GetInputStream, out)
out.Close '<------ very important
If (File.Exists(dirx,newname)) Then
Log ("file exist")
File.Copy(dirx,newname,File.DirDefaultExternal,"Pictures/" & newname) ' <------ ERROR
End If
Else
Log("Error: " & job.ErrorMessage)
End If
job.Release