[Catalyst] Catalyst::Plugin::Static::Simple 0.11 on Win32
Will Hawes
info at whawes.co.uk
Mon Nov 14 13:58:03 CET 2005
I'm working on Win32 using Catalyst 5.51 and the test server. I want to
serve static content from a folder outside of my Catalyst application
(e.g. 'C:\images'). Under "Including Additional Directories", the docs
for Catalyst::Plugin::Static::Simple seem to suggest this is possible.
Code is as follows:
use Catalyst qw/-Debug Static::Simple/;
MyApp->config->{static}->{dirs} = [
'static'
];
MyApp->config->{static}->{include_path} = [
'C:\\images' # here I have also tried 'C:\images' and 'C:/images'
];
The URL is 'http://localhost:3000/static/1.gif'.
With the include_path setting commented out, the static file 1.gif is
served correctly from root/static. But if I copy the file to C:\images,
uncomment the include_path setting and restart the test server, nothing
is served. The debug log contains "Static::Simple: 404: file not found:
static/1.gif".
I'm assuming I've missed something, but I can't work out what from the
docs, which are a bit ambiguous imo.
Any ideas?
More information about the Catalyst
mailing list