Compare commits

...

1 Commits

Author SHA1 Message Date
Git'Fellow
1ba646a193 fix(PublicPreview): Call getMimetype() on File objects
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-11-04 18:33:46 +01:00

View File

@@ -132,7 +132,7 @@ class PublicPreviewController extends PublicShareController {
return $response;
} catch (NotFoundException $e) {
// If we have no preview enabled, we can redirect to the mime icon if any
if ($mimeFallback) {
if ($file instanceof \OCP\Files\File && $mimeFallback) {
if ($url = $this->mimeIconProvider->getMimeIconUrl($file->getMimeType())) {
return new RedirectResponse($url);
}