These are chat archives for SmingHub/Sming

Jan 2019
Jan 24 00:34

@mikee47 I want to put my web pages into flash, using IMPORT_FSTR as previously discussed.
The example in HttpServer_ConfigNetwork works well, because TemplateFlashMemoryStream derives from TemplateStream, using FlashMemoryStream to pass the parameter.
So far so good, but I have other files I want to serve up, eg favicon.ico which currently sits in SPIFFs.
and I currently send it using response.sendFile(file);

I'd like to do avoid spiffs, but unfortunately the following code doesnt compile.

IMPORT_FSTR(flash_faviconico, "web/build/favicon.ico")
auto stream = new FlashMemoryStream(flash_faviconico);
response.sendDataStream(stream, MimeType::MIME_ICO);

Is this all set to change soon?

Jan 24 08:39
IMPORT_FSTR has to be in global scope, can't be in a function.
Jan 24 11:00
@mikee47 Yes I know, just abbreviated my code a bit too much. My question wasnt how to make it compile, but rather if this sort of thing is on your radar
Jan 24 12:07
@frankdownunder OK, so when you say "doesn't compile" can you be more specific? I'm not sure what you mean about 'this sort of thing'.