[Dancer-users] New plugin
Oleg A. Mamontov
oleg at mamontov.net
Thu Jul 14 22:26:40 CEST 2011
On Jul 14, 2011, at 10:48 PM, Stephen Fenwick-Paul wrote:
> Well done Oleg.
>
>
> I wrote something very similar a few days ago, but have not CPAN it yet because I wasn't happy with how it worked and I thought you would all laugh.
>
> My resizer is basically a copy of Apache2-Imager-Resize.
>
> The reservation with my design is that I was forced to use a route outside of /public to transform the image.
>
> I really would have liked to be able to,
>
> if my original image was,
>
> /images/fred.jpg
>
> to have done the below to transform it
>
> /images/fred.jpg?h=50&w=200
>
> but I was forced to
>
> /resize/images/fred.jpg?h=50&w=200
>
> as Oleg effectively has
>
> Is there a way of getting a user defined route to intercept a file in /public?
>
> If that was the case a resizer plugin would more easy integrate with an old system as the images would not need to have there src changed to the new route. No big deal either way.
Have you any reverse proxy in front of the Dancer application?
For example nginx could be easily configured like:
location / {
proxy_pass http://localhost:8080;
}
location /images/ {
if ( $args ) {
rewrite (.*) /resize$1?$args last;
}
root /path/to/public;
}
E.g. source images will be served with nginx (root) and resized (detected
by non-empty query string) will be proxied to the Dancer application.
>
> Stephen
>
>
>
>
>
>
>
>
>
> On Thu, Jul 14, 2011 at 7:19 PM, Stefan Hornburg (Racke) <racke at linuxia.de> wrote:
> On 07/14/2011 08:13 PM, Oleg A. Mamontov wrote:
> Hi.
>
> I have recently uploaded the new Dancer plugin for common task of images
> thumbnails creation: http://search.cpan.org/~lonerr/Dancer-Plugin-Thumbnail
>
> It's probably offtopic for this list, but i hope to get some constructive
> criticism or new ideas from experienced Dancer developers.
>
> I would appreciate any comments!
>
>
>
> Great! That is certainly one plugin I'll use in the not to distant future.
>
> Regards
> Racke
>
> --
> LinuXia Systems => http://www.linuxia.de/
> Expert Interchange Consulting and System Administration
> ICDEVGROUP => http://www.icdevgroup.org/
> Interchange Development Team
>
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
--
Cheers,
Oleg A. Mamontov
mailto: oleg at mamontov.net
jabber: lonerr at charla.mamontov.net
icq uin: 79-521-617
cell: +7-903-798-1352
More information about the Dancer-users
mailing list