[Catalyst] Catalyst::Plugin::Static::Simple 0.11 on Win32

Will Hawes info at whawes.co.uk
Mon Nov 14 15:20:45 CET 2005


Christopher H. Laco wrote:
> Jules Bean wrote:
>> Will Hawes wrote:
>>
>>> 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".
>>
>> put it in C:\images\static\1.gif
>>
>> J
> 
> When we're talking about directories outside of the Catalyst Apps root,
> I think this is a misfeature. One shouldn't have to move their content
> to allow it to be served by Catalysts static handlers. That is afterall,
> the point of this plugin.
> 
> The directory requested was c:\images, and c:\images it should be; not
> c:\images\static...
> 
> But I digress...
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst

I think a useful feature would be a way to map each path in 
$c->config->{static}->{dirs} to a particular storage location. Something 
like:

$c->config->{static}->{dirs} = [
	'static' => MyApp->config->{root} . '/static',
	'images' => '/path/to/images',
	...
];

As Chris says, it's not practical to move static content around to suit 
the needs of an app. It may not even be possible depending on how your 
machine/network is set up and what you have access rights to.




More information about the Catalyst mailing list