Photo=su.EncodeUrl(Photo,"UTF-8")
URL= modFun.URLImage & Photo
j.Initialize("", Me)
j.Download(URL)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream = File.OpenOutput(Starter.FileDir, Photo, False)
File.Copy2(j.GetInputStream, out)
out.Close '<------ very important
Log("Photo " & Photo & " downloaded Ok")
Main.TestRet=True
Else
modFun.ShowError("clsRefreshResume_HTTP Download error " & CRLF & "Try again later with better Internet connection and check if photo exists on a provider profile.~<br/>URL=" & URL)
Main.TestRet=False
End If
j.Release