There was an error while loading. Please reload this page.
2 parents 36804e7 + 272ba67 commit 17ba722Copy full SHA for 17ba722
1 file changed
apps/files_sharing/lib/Controller/PublicPreviewController.php
@@ -131,7 +131,7 @@ public function getPreview(
131
return $response;
132
} catch (NotFoundException $e) {
133
// If we have no preview enabled, we can redirect to the mime icon if any
134
- if ($mimeFallback) {
+ if ($file instanceof \OCP\Files\File && $mimeFallback) {
135
if ($url = $this->mimeIconProvider->getMimeIconUrl($file->getMimeType())) {
136
return new RedirectResponse($url);
137
}
0 commit comments