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