This is driving me nuts, so I would appreciate any advice. Perhaps it is just a silly oversight on my part.
punkish@Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$pwd
/Users/punkish/Sites/carbonapp/public/images/models/2bau/years/8
punkish@Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$ls 2*
2010_nep.gif
punkish@Lucknow ~/Sites/carbonapp/public/images/models/2bau/years/8$
So, as you can see, the following file exists
/Users/punkish/Sites/carbonapp/public/images/models/2bau/years/8/2010_nep.gif
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'");
send_file("$dir/$img");
};
My development.log shows