Re: [vibe.d] showing images

2016-10-26 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 26 October 2016 at 18:39:00 UTC, Rene Zwanenburg wrote: On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: [...] You need to make the images accessible over HTTP. Note the use of staticFileServer in the following example: http://vibed.org/docs#http-routing

Re: [vibe.d] showing images

2016-10-26 Thread Karabuta via Digitalmars-d-learn
On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: doctype html html body -foreach(s; images) // it doesn't seem to like #{s} or !{s} img(src=s) [...] Inherit from Web interface?

Re: [vibe.d] showing images

2016-10-26 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: doctype html html body -foreach(s; images) // it doesn't seem to like #{s} or !{s} img(src=s) -- shared static this() { auto router = new URLRouter;

Re: [vibe.d] showing images

2016-10-26 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 26 October 2016 at 12:57:24 UTC, wobbles wrote: On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: [...] When you get the 404, do you see the contents of 'writeln(images);' in your terminal? yes. the 404 is only for the image the page still renders fine,

Re: [vibe.d] showing images

2016-10-26 Thread wobbles via Digitalmars-d-learn
On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: [...] When you get the 404, do you see the contents of 'writeln(images);' in your terminal?

[vibe.d] showing images

2016-10-26 Thread Nicholas Wilson via Digitalmars-d-learn
doctype html html body -foreach(s; images) // it doesn't seem to like #{s} or !{s} img(src=s) -- shared static this() { auto router = new URLRouter; router.registerWebInterface(new CamController); auto settings = new HTTPServerSettings;