summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/Bundled.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-04-05 11:01:40 +0200
committerJulius Härtl <jus@bitgrid.net>2020-04-08 16:31:20 +0200
commit124b109bc8fbe76e7b4ed43b99f36c29022ade97 (patch)
tree2d8042030e470a094bfb69775a8d204a5354ac40 /lib/private/Preview/Bundled.php
parenta2e671c489528a935c7a4e186188f84ea2b3058e (diff)
downloadnextcloud-server-124b109bc8fbe76e7b4ed43b99f36c29022ade97.tar.gz
nextcloud-server-124b109bc8fbe76e7b4ed43b99f36c29022ade97.zip
Add preview provider for Krita files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Preview/Bundled.php')
-rw-r--r--lib/private/Preview/Bundled.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php
index 6f3d811ca61..afd286d895b 100644
--- a/lib/private/Preview/Bundled.php
+++ b/lib/private/Preview/Bundled.php
@@ -23,10 +23,9 @@
namespace OC\Preview;
+use OC\Archive\ZIP;
use OCP\Files\File;
-use OCP\Files\NotPermittedException;
use OCP\IImage;
-use OCP\Lock\LockedException;
/**
* Extracts a preview from files that embed them in an ZIP archive
@@ -39,10 +38,9 @@ abstract class Bundled extends ProviderV2 {
try {
$content = $file->fopen('r');
- $content = stream_get_contents($content);
file_put_contents($sourceTmp, $content);
- $zip = new \OC\Archive\ZIP($sourceTmp);
+ $zip = new ZIP($sourceTmp);
$zip->extractFile($path, $targetTmp);
$image = new \OC_Image();