diff --git a/conf/ldv.conf.sample b/conf/ldv.conf.sample index 52f7403..4f48b2a 100644 --- a/conf/ldv.conf.sample +++ b/conf/ldv.conf.sample @@ -30,6 +30,7 @@ root => 'data/imgbin', expire => 'year', maxres => '8192x8192', + maxmem => 96 * 1024 * 1024, maxsize => 32 * 1024 * 1024, thumbs_ext => 'jpg', thumbs_size => '250x250', diff --git a/lib/LDV/Imgbin.pm b/lib/LDV/Imgbin.pm index 741520c..2c5eb5f 100644 --- a/lib/LDV/Imgbin.pm +++ b/lib/LDV/Imgbin.pm @@ -84,7 +84,7 @@ sub save { my ($im_w, $im_h) = ($conf->{maxres} =~ m/(\d+)x(\d+)/oi); Imager->set_file_limits( width => $im_w, height => $im_h, - bytes => $conf->{maxsize}, + bytes => $conf->{maxmem}, ); my $image = Imager->new(file => $upload->asset->path)