|
|
@ -87,7 +87,7 @@ sub save { |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
my $image = Imager->new(file => $upload->asset->path) |
|
|
|
my $image = Imager->new(file => $upload->asset->path) |
|
|
|
or die Imager->errstr(); |
|
|
|
or die(Imager->errstr() . "\n"); |
|
|
|
|
|
|
|
|
|
|
|
my $json = { |
|
|
|
my $json = { |
|
|
|
comment => $image->tags(name => 'i_comment') // '', |
|
|
|
comment => $image->tags(name => 'i_comment') // '', |
|
|
@ -111,6 +111,8 @@ sub save { |
|
|
|
|
|
|
|
|
|
|
|
$self->redirect_to("/imgbin/$time"); |
|
|
|
$self->redirect_to("/imgbin/$time"); |
|
|
|
} or do { |
|
|
|
} or do { |
|
|
|
|
|
|
|
$self->app->log->error($@); |
|
|
|
|
|
|
|
$@ =~ s/\s+ at \s+ .+ \s+ line \s+ \d+//oxi; |
|
|
|
$self->flash(error => $@); |
|
|
|
$self->flash(error => $@); |
|
|
|
$self->redirect_to('/imgbin'); |
|
|
|
$self->redirect_to('/imgbin'); |
|
|
|
}; |
|
|
|
}; |
|
|
|