Browse Source

debug

master
Pascal Gloor 5 years ago
parent
commit
3aa51beed1
1 changed files with 4 additions and 33 deletions
  1. 4
    33
      cgi/autodoc.fcgi

+ 4
- 33
cgi/autodoc.fcgi View File

} }
else { else {
if ( ! -r $dst ) { if ( ! -r $dst ) {
system(sprintf("convert %s -resize %s%s %s",
my $cmd = sprintf("convert %s -resize %s%s %s",
$src, $src,
$wh eq 'h' ? 'x' : '', $wh eq 'h' ? 'x' : '',
$size, $size,
$dst $dst
));
);
print STDERR "CMD=$cmd\n";
system($cmd);
} }


$imgfile = $dst; $imgfile = $dst;
return $img; return $img;
} }


sub gen_thumbnail {
my($original, $cache, $wh, $size) = @_;

if ( -r $original ) {
system(sprintf("convert %s -resize %s%s %s",
$original,
$wh eq 'h' ? 'x' : '',
$size,
$cache
));
}
}

sub gen_error_img {
my($wh, $size) = @_;

my $src = $conf->{page}{error_img};
my $dst = sprintf("%s/error_img-%s%s.jpeg", $conf->{path}{cache}, $wh, $size);

if ( ! -r $dst ) {
my $cmd = sprintf("convert %s -resize %s%s %s",
$src,
$wh eq 'h' ? 'x' : '',
$size,
$dst);
print STDERR "IMG: $cmd\n";
system($cmd);
}

}

# create an empty document object. # create an empty document object.
sub api_v1_POST_documents { sub api_v1_POST_documents {
my($id, $qs, $post, $user) = @_; my($id, $qs, $post, $user) = @_;

Loading…
Cancel
Save