Board index » delphi » problem loading pictures of web page using TidHTTPServer and TPageProducer
Glen Welch
![]() Delphi Developer |
problem loading pictures of web page using TidHTTPServer and TPageProducer2006-06-28 09:08:04 AM delphi172 Following is some code I am using to fill in Tags from a web page - then send it using TidHTTPServer. Im not sure if this is the best way of doing this but I cant get it to work at all. If there is a better way of filling in tags then please let me know cause as you can see I am having to save out to the tempary file. htmlPageProducer: TPageProducer; HTTPServer: TIdHTTPServer; if FileExists(LocalDoc) then // File exists begin htmlPageProducer.HTMLFile:= LocalDoc; TempFileName:= ChangeFileExt(LocalDoc, '.tmp'); TempFile:= TStringList.Create; try TempFile.Add(htmlPageProducer.Content); TempFile.SaveToFile(TempFileName); finally TempFile.Destroy; end; HTTPServer.ServeFile(AThread, AResponseInfo, TempFileName); end; Problem is that images are not being displayed. If i use HTTPServer.ServeFile(AThread, AResponseInfo, LocalDoc); all works fine Thanx in advance. |