HTTP server - image import

Hello,

I’m using DIGI connect ME9210 (NET+OS) and sample app “HTTP CGI Server Sample”.
I just need to modify the html file so that it will show an image when you access the device. I can successfully launch the HTML server, but I’m not able to display an image.

First in folder web->webcontents->html I place “mytest.html” as following:

Test page

Then under web->webcontents->html I create folder “images” where I place “logo.png”.
Using PBuilder I generate the code, compile it and flash into the device. Everything successful.

However, when I access the device’s HTTP server I see that the image has not been loaded.
So my question is how can I link the image with the http server? Where shall I place the image? Do I need to create any file system?

I will appreciate any suggestions.

Thank you

  1. Have you added the image to the file list in PBUILDER.PBB?
  2. I found I needed a capital ‘I’ for the images directory:

Hi,

thanks. You are right. I just needed to put capital ‘I’:

Then it worked fine.

I was wondering why is that and eventually I found if you run the PBuilder it creates a master object list (rpObjectDescriptionPtr gRpObjectList[]) in “RpPages.c” which includes descriptors of all objects you imported (images, html files, css files, …).
If you than have a look at them, you can see paths where the objects are actually stored in ROM. For my image it was: “/Images/logo.png”. Then you can update your .html file accordingly.

Daniel