Aaron
It is possible to serve files from anywhere, also from code, as you have seen at a coupe of locations in the project, however this has to be controlled to a certain degree from outside of the HTTP server. The HTTP server works autonomously with files in the file system and so this is the easiest method.
Don't forget that the there is a bat file in \Applications\uTaskerV1.3\WebPages\WebPagesM5223X called Copy_all.bat. You can edit ftp.txt to automatically load all of your project files by double clicking on it. This is fast and usually easier than working with files embedded in the code (also more flexible since the project doesn't have to be recompiled due to HTML changes).
However also images could be embedded as long as you have a program that converts them to a binary array which can be linked into the code. Eg.
const unsigned char image1[] = {0x00, 0x01, 0x03, 0x03.....0xf2};
The web server then needs to known the pointer to it and its length and it can serve it. It should also be told that it is not an HTML file so that it doesn't try passing it to look for places to insert strings and stuff.
somewhere suitable...
http_session->ptrFileStart = (unsigned char*)image1;
http_session->FileLength = sizeof(image1);
http_session->ucMimeType = MIME_JPG;
Once this is set it will be served (instead of the page from the file system) in response to a GET.
However there is no standard support for this and so it might get trickier if referencing images from HTML in this manor. Generally web servers which use this method can't support FTP and have a special program that converts the web pages to am embedded set of lots of such arrays - somehow linked to each other where necessary.
I would have a go with the FTP bat since most users (especially the ones who don't program the code but just develop the web pages) tend to find it very handy.
Regards
Mark
PS. When a program with web pages is to be programmed for production purposes as a one-shot task this is also quite easy.
- load a board with the program and then upload the web pages via FTP.
- Now do a copy of the entire FLASH with a debugger to a reference file.
- Now simply program the reference file each board in the factory (they will have program and web pages in one go)