diff --git a/lib/LDV/Imgbin.pm b/lib/LDV/Imgbin.pm index 28047d1..ebdfa23 100644 --- a/lib/LDV/Imgbin.pm +++ b/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;