Skip to content

Commit

Permalink
fix: Disable pdf preview gnerator through Collabora if server already…
Browse files Browse the repository at this point in the history
… has support for it

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 16, 2023
1 parent 6ff1851 commit d2374f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ public function registerProvider() {
return $container->get(OpenDocument::class);
});

$previewManager->registerProvider('/application\/pdf/', function () use ($container) {
return $container->get(Pdf::class);
});
if (!$previewManager->isMimeSupported('application/pdf')) {
$previewManager->registerProvider('/application\/pdf/', function () use ($container) {
return $container->get(Pdf::class);
});
}
}

public function checkAndEnableCODEServer() {
Expand Down

0 comments on commit d2374f7

Please sign in to comment.