blob: 9e6cd68d401bae46ac24c38af26b8e9de56d0ee8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
/**
* Copyright (c) 2013 Frank Karlitschek frank@owncloud.org
* Copyright (c) 2013 Georg Ehrke georg@ownCloud.com
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OC\Preview;
class Unknown extends Provider {
public function getMimeType() {
return '/.*/';
}
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
$mimetype = $fileview->getMimeType($path);
$path = \OC_Helper::mimetypeIcon($mimetype);
$path = \OC::$SERVERROOT . substr($path, strlen(\OC::$WEBROOT));
return new \OC_Image($path);
}
}
\OC\Preview::registerProvider('OC\Preview\Unknown');
|