I'll try, thanks!

2014-06-15 18:55 GMT+04:00 Luc Didry <[email protected]>:

> On 15/06/2014 16:39, Ivan Martynow wrote:
> > And could you please help me to write a route for such a situation? Let's
> > say full versions of pics are stored in /images/big/foldername/file.jpg.
> > I'm writing something like this:
> > get 'qr!/images/big/.*/(.*\.jpg)!i' => sub {
> >     my $self = shift;
> >     $self->stash(pic => $1); #it's a value passed through stash for <img
> > src="<%=$pic%>"> tag.
> >     $self->render('gallery_big');
> > };
> > but it doesn't seem to work: pictures are still given back as static
> files.
> > Sorry for dumb questions, but I'm totally new frameworking.
> >
> >
> > 2014-06-15 16:23 GMT+04:00 Daniel Vinciguerra <[email protected]
> >:
> >
> >> You can use a route to render image instead of use the real image file
> >> path, for example.
> >>
> >> At route you can check user authentication and open static file... if
> user
> >> is not authenticated you can show another image regarding
> unauthenticated
> >> user status.
> >>
> >>
> >> Its can help you, I guess..
> >>
> >> best,
> >>
>
> You can store your images in a path which is not in the public directory
> and render the images with Mojolicious::Plugin::RenderFile
> (https://github.com/koorchik/Mojolicious-Plugin-RenderFile)
>
> Hope this will help.
> --
> Luc
> http://www.fiat-tux.fr/
> Internet n'est pas compliqué, Internet est ce que vous en faites.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to