Hi group,
I have no idea how to export images located outside of public directory.
Forgive me to disturbing groups such a lame questions but cant find working example with google...
I have a route
$r->get('/pdataexport_qc')->to('Pdataexport#showQC');
$r->post('/showqcshowimg')->to('Pdataexport#showQCshowIMG');
in my Pdataexport.pm
sub showQC{
my $self = shift;
my $pDataPath = $self->config('phenotypeDataFromResoraDbFilesPath');
my $dir = $self->param('dir');
$self->stash( dirToQC => $dir);
$self->render('phenotypeExport/showDataQC');
}
my template phenotypeExport/showDataQC.html.ep
% layout 'all';
which generates me nice url
</table>
</table>
but in log output I can see that was not routed to showqcshowimg
sub showQCshowIMG {
my $self = shift;
my $img = $self->param('img');
my $dir = $self->param('dir');
my $pDataPath = $self->config('phenotypeDataFromResoraDbFilesPath');
$self->render_file(filepath => $pDataPath.$dir."/".$img, 'filename' => $img );
}
Can you give a simpe example how it should be done?
or maybe you know page or open project which can play as example?
Thank you,
tj