diff options
author | Georg Ehrke <developer@georgehrke.com> | 2014-11-23 21:11:03 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-12 10:30:17 +0300 |
commit | 5fd1d54607dc5ba8b6e54bdf175288ca2534471a (patch) | |
tree | 0bf70157c99e3640dfbdb4e2f18d84bc656a413b /lib/private | |
parent | 0eb3496ab6a72036baf279a665a4ce7a38a036b0 (diff) |
remove ugly hack and don't use OC\Preview\Image for tiffs and svgs
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/preview.php | 10 | ||||
-rw-r--r-- | lib/private/preview/image.php | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index 907bef923b5..a0f2e81528f 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -855,16 +855,6 @@ class Preview { self::initProviders(); } - // FIXME: Ugly hack to prevent SVG of being returned if the SVG - // provider is not enabled. - // This is required because the preview system is designed in a - // bad way and relies on opt-in with asterisks (i.e. image/*) - // which will lead to the fact that a SVG will also match the image - // provider. - if($mimeType === 'image/svg+xml' && !array_key_exists('/image\/svg\+xml/', self::$providers)) { - return false; - } - foreach(self::$providers as $supportedMimetype => $provider) { if(preg_match($supportedMimetype, $mimeType)) { return true; diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php index cec5d7c0170..c5f566aa946 100644 --- a/lib/private/preview/image.php +++ b/lib/private/preview/image.php @@ -11,7 +11,7 @@ namespace OC\Preview; class Image extends Provider { public function getMimeType() { - return '/image\/.*/'; + return '/image\/(?!tiff$)(?!svg.*).*/'; } public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { |