summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/preview.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 145b7924c05..d8a9a3e1b78 100644
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -701,9 +701,12 @@ class Preview {
$this->generatePreview($fileId);
}
- // We still don't have a preview, so we generate an empty object which can't be displayed
+ // We still don't have a preview, so we send back the mime icon
if (is_null($this->preview)) {
$this->preview = new \OC_Image();
+ $mimeIconWebPath = \OC_Helper::mimetypeIcon($this->mimeType);
+ $mimeIconServerPath = str_replace(\OC::$WEBROOT, \OC::$SERVERROOT, $mimeIconWebPath);
+ $this->preview->loadFromFile($mimeIconServerPath);
}
return $this->preview;