mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-09 11:29:01 +00:00
add commands for make previews of tar.gz, .ps, .txt
This commit is contained in:
parent
d87296c859
commit
fecc6d2804
|
@ -98,13 +98,22 @@ class SeedDMS_Preview_Previewer {
|
||||||
case "image/gif":
|
case "image/gif":
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
case "image/jpg":
|
case "image/jpg":
|
||||||
|
case "image/svg+xml":
|
||||||
$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.' '.$target;
|
$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.' '.$target;
|
||||||
break;
|
break;
|
||||||
case "application/pdf":
|
case "application/pdf":
|
||||||
|
case "application/postscript":
|
||||||
$cmd = 'convert -density 18 -resize '.$width.'x'.$width.' '.$file.'[0] '.$target;
|
$cmd = 'convert -density 18 -resize '.$width.'x'.$width.' '.$file.'[0] '.$target;
|
||||||
|
break;
|
||||||
|
case "text/plain":
|
||||||
|
$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.'[0] '.$target;
|
||||||
|
break;
|
||||||
|
case "application/x-compressed-tar":
|
||||||
|
$cmd = 'tar tzvf '.$file.' | convert -resize '.$width.'x'.$width.' text:-[0] '.$target;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if($cmd) {
|
if($cmd) {
|
||||||
system( $cmd);
|
exec($cmd);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user