Browse Source

* LDV::Imgbin : check image expiration

master
Alex 'AdUser' Z 9 years ago
parent
commit
85f2d7421a
  1. 1
      lib/LDV/Imgbin.pm

1
lib/LDV/Imgbin.pm

@ -47,6 +47,7 @@ sub view {
my $data = Mojo::Asset::File->new(path => $path);
$data->cleanup(0);
my $json = decode_json($data->slurp);
die("image expired\n") if (time() > $data->{expire});
$json->{path} = $self->_image_path($time, $json->{format});
$self->stash(image => $json); 1;

Loading…
Cancel
Save