Any clue? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- GiovanniF · 2013-10-22 16:12 Aresponse.Contents.Add(''); Handled := true; The above code chunk is a part of a program. My question is: Why PICTURES are not skown? Any text is. Rgds //GF ---------------------------------------------------------------------- JuhaManninen · 2013-10-22 21:12 Quote from: GiovanniF on October 22, 2013, 06:12:09 pmAresponse.Contents.Add(''); Handled := true; The above code chunk is a part of a program. My question is: Why PICTURES are not skown? My guess: the img tag is not closed anywhere. Add '/' to its end. ---------------------------------------------------------------------- GiovanniF · 2013-10-23 08:57 Here comes the HTML code:
Where is my PICTURE?
kkk
IF I load it in the browser it works perfectly. IF I run with FASTCGI with Aresponse.contents.LoadFromFile('aaa.html') it WON'T display the picture!!!! I do NOT see any problem with the little HTML code displayed. The problem is somewhere else. WHERE?  Best Regards GF ---------------------------------------------------------------------- wp · 2013-10-23 09:08 Put the image file name in double quotation marks? ---------------------------------------------------------------------- Leledumbo · 2013-10-23 10:12 In case of image, the problem might be the content type. You have to set the right one. It's 'image/jpeg' for jpeg files. You can see in your browser's developer tools to prove my guess (the default content type is application/octet-stream). ---------------------------------------------------------------------- GiovanniF · 2013-10-23 11:14 I tried that too. Doesn't work. Thanks. My guess is that the FCGI application is NOT sending the binary data (picture) but only the text . ---------------------------------------------------------------------- Leledumbo · 2013-10-23 16:08 QuoteI tried that too. Doesn't work. Thanks.Give me the output of your browser's developer tools (something like in the attached picture). I'm guessing your app doesn't even serve the image correctly. ---------------------------------------------------------------------- GiovanniF · 2013-10-24 19:52 Which browser are you using? Which "tool" are you talking about? Thanks for you effort! Rgds //GF ---------------------------------------------------------------------- Leledumbo · 2013-10-25 04:33 QuoteWhich browser are you using?Google Chrome, but recent Firefox also has it by default AFAIK. You can also install Firebug on previous Firefox. QuoteWhich "tool" are you talking about?In Google Chrome: Tools->Developer Tools (or Ctrl+Shift+I). ---------------------------------------------------------------------- GiovanniF · 2013-10-25 11:15 ok. HERE WE GO  See the attachment. Best regards ---------------------------------------------------------------------- Leledumbo · 2013-10-25 16:12 Now that's weird. You have /lamm/act2 serving image/jpeg while above you specify a html file. If you use above code, there should be 2 requests. 1 for the html file, 1 for the image link contained in the html file. ---------------------------------------------------------------------- GiovanniF · 2013-10-27 08:05 Try this: Create a FGCI or a WebModule. Then within the Module or FCGI try to load a HTML file that contain               You'll see! I believe that it is a bug, but since this components are not documented, I'll look in the code. Best Rgds //GF ---------------------------------------------------------------------- Leledumbo · 2013-10-27 12:13 QuoteI believe that it is a bug, but since this components are not documented, I'll look in the code.I believe it's not, because I've used it and it works just fine (for a long time). The problem is your img requests blablabla.jpg, which sends /blablabla.jpg to the server. If you don't have handler for this (either in your FCGI app or web server), it won't work. Try the attached project (put yourpicture.jpg in the same directory as the fcgi binary). ---------------------------------------------------------------------- GiovanniF · 2013-10-27 17:52 I thank you very much for the effort and the patient but THAT is not the solution I am looking for! I have to be able to load HTML pages with BOTH text and pictures! Do you think that it kan be done  by HTMLpageProducer within fpWeb? Rgds /GF ---------------------------------------------------------------------- Leledumbo · 2013-10-28 08:50 QuoteI have to be able to load HTML pages with BOTH text and pictures!Well, it can. What do you think the HTML is? HTML is just text. And again, if you see in the developer tools, you'll get TWO requests. One is text/html, the other is image/jpeg. I guess you need to learn about network and web programming theory more. QuoteDo you think that it kan be done  by HTMLpageProducer within fpWeb?Sure, it's just a (relatively) convenient way to produce HTML pages. ---------------------------------------------------------------------- GiovanniF · 2013-10-28 17:28 Is there ANY example where I can see how to use  HTMLpageProducer? BTW I have solved my problem  I want to thank you a lot for all help! Rgds //GF ---------------------------------------------------------------------- Leledumbo · 2013-10-29 06:08 QuoteIs there ANY example where I can see how to use  HTMLpageProducer?I'm afraid not officially, probably someone has.