Re: [Mojolicious] rendering images located outside of public directory

2018-04-06 Thread Caveman Pl
It works! Thank you All, tj W dniu piątek, 6 kwietnia 2018 08:29:11 UTC+2 użytkownik Tekki napisał: > is the browser URL, not the absolute path of the file on > the server. So if you add '/data/common/mojo' to the static paths, the tag > for '/data/common/mojo/2018-04-03-18-32-46_G/AH1vsAGE.

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Tekki
is the browser URL, not the absolute path of the file on the server. So if you add '/data/common/mojo' to the static paths, the tag for '/data/common/mojo/2018-04-03-18-32-46_G/AH1vsAGE.png' is Am Donnerstag, 5. April 2018 22:25:37 UTC+2 schrieb Caveman Pl: > > > -- You received this messa

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Caveman Pl
didnt know what an $app object is... but found this page http://blogs.perl.org/users/revlin_john/2013/03/re-simple-webserver---serve-static-files-with-mojolicious.html when I add to startup subroutine in lib/MyApp.pm push @{$self->static->paths}, '/data/common/mojo/'; nothing is happen - image d

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Stefan Adams
I don't think you want to create a new object, you want to modify the current app. Instead, $app->static->paths Sent from my phone... On Thu, Apr 5, 2018, 3:25 PM Caveman Pl wrote: > Hi Stefan, > > Yes they are static files outside dir tree generated by command "mojo > generate app" which is l

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Caveman Pl
Hi Stefan, Yes they are static files outside dir tree generated by command "mojo generate app" which is located in my home dir /home/tomasz/work/mojo/my_app/. I have tryed also inlib/MyApp.pm use Mojolicious::Static; my $static = Mojolicious::Static->new; push @{$static->paths}, '/data/commo

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Stefan Adams
I might be off base, but I'm wondering if what you're looking for is how to serve static files from a non default location? http://mojolicious.org/perldoc/Mojolicious#static On Thu, Apr 5, 2018, 2:19 PM Caveman Pl wrote: > Hi Dan, > > Changing > > $r->post('/showqcshowimg')->to('Pdataexport#sh

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Caveman Pl
Hi Dan, Changing $r->post('/showqcshowimg')->to('Pdataexport#showQCshowIMG'); to $r->get('/showqcshowimg')->to('Pdataexport#showQCshowIMG'); doesn't help. Thank you, tj W dniu czwartek, 5 kwietnia 2018 20:34:07 UTC+2 użytkownik Dan Book napisał: > Sorry, your issue is in routing: your sho

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Dan Book
Sorry, your issue is in routing: your showimg route is POST-only, but browsers will always use GET to request an image. On Thu, Apr 5, 2018 at 2:32 PM, Dan Book wrote: > Try this: https://metacpan.org/pod/Mojolicious::Guides:: > Rendering#Custom-responses > > On Thu, Apr 5, 2018 at 2:26 PM, Cave

Re: [Mojolicious] rendering images located outside of public directory

2018-04-05 Thread Dan Book
Try this: https://metacpan.org/pod/Mojolicious::Guides::Rendering#Custom-responses On Thu, Apr 5, 2018 at 2:26 PM, Caveman Pl wrote: > 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 > wo