[Dancer-users] sending file fails

Puneet Kishor punk.kish at gmail.com
Tue Jan 4 02:09:24 CET 2011

This is driving me nuts, so I would appreciate any advice. Perhaps it is just a silly oversight on my part.

punkish at Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$pwd
punkish at Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$ls 2*
punkish at Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$

So, as you can see, the following file exists


My route is

get '/:model_id/year/:year/zoom/:zoom/:output' => sub {
my $model_id = params->{model_id};
my $year = params->{year};
my $zoom = params->{zoom};
my $output = params->{output};

# get model_file based on model_id

my $dir = config->{'app_dir'} . '/' . config->{'img_dir'} . "/$model_file/years/$zoom";
my $img = $year . '_' . $output . '.gif';

debug("sending '$dir/$img'");

My development.log shows

[37838] debug @0.008607> [hit #1] sending '/Users/punkish/Sites/carbonapp/public/images/models/2bau/years/8/2010_nep.gif' in /Users/punkish/Sites/carbonapp/lib/carbonapp/models.pm l. 106

and yet, I get the following error in my browser

{"error":"No such file: `/Users/punkish/Sites/carbonapp/public/images/models/2bau/years/8/2010_nep.gif'"}

Please point me to my stupid ways.

Puneet Kishor
Sent with Sparrow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110103/5e973015/attachment.htm>

More information about the Dancer-users mailing list