in reply to Re^2: Mojolicious: rendering images located outside of public directory
in thread Mojolicious: rendering images located outside of public directory
How do I insert this into <img src>? I still don't get it :).
src takes a path string, which part is render_static under? path path path path path path path path path path path path :)
see Re^2: Mojolicious, layouts and content generating. its tested, below isn't tested (template missing)
use Mojolicious::Lite; get '/render_static/:img' => sub { my $self = shift; my $img = $self->param('img'); my $path_to_private_images = ...( $img ); return $self->render_static( $path_to_private_images ); } __DATA__ .. <img src="<%= url_for( '/render_static/yo.png' ) -%>">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Mojolicious: rendering images located outside of public directory
by Kyshtynbai (Sexton) on Jun 19, 2014 at 07:44 UTC | |
|
Re^4: Mojolicious: rendering images located outside of public directory
by Kyshtynbai (Sexton) on Jun 19, 2014 at 08:36 UTC | |
by Anonymous Monk on Jun 19, 2014 at 08:41 UTC |