Merge pull request #18475 from nextcloud/backport/18456/stable17

[stable17] Fix Office preview generation
This commit is contained in:
Roeland Jago Douma 2019-12-19 10:33:03 +01:00 committed by GitHub
commit 6f1219cd95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ abstract class Office extends ProviderV2 {
$pngPreview = null;
try {
list($dirname, , , $filename) = array_values(pathinfo($absPath));
$pngPreview = $dirname . '/' . $filename . '.png';
$pngPreview = $tmpDir . '/' . $filename . '.png';
$png = new \imagick($pngPreview . '[0]');
$png->setImageFormat('jpg');