diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 2dd62a2cec..425617813f 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -109,7 +109,7 @@ class PreviewController extends Controller { return new DataResponse([], Http::STATUS_FORBIDDEN); } - $preview = new \OC\Preview2( + $preview = new \OC\Preview\Generator( $this->root, $this->config, $this->previewManager, diff --git a/lib/private/Preview2.php b/lib/private/Preview/Generator.php similarity index 99% rename from lib/private/Preview2.php rename to lib/private/Preview/Generator.php index e1f3af6ebd..6a2e2a4717 100644 --- a/lib/private/Preview2.php +++ b/lib/private/Preview/Generator.php @@ -20,7 +20,8 @@ * along with this program. If not, see . * */ -namespace OC; + +namespace OC\Preview; use OC\Files\View; use OCP\Files\File; @@ -35,7 +36,7 @@ use OCP\Image; use OCP\IPreview; use OCP\Preview\IProvider; -class Preview2 { +class Generator { //the thumbnail folder const THUMBNAILS_FOLDER = 'thumbnails'; @@ -87,7 +88,7 @@ class Preview2 { * @return ISimpleFile * @throws NotFoundException */ - public function getPreview($width = -1, $height = -1, $crop = false, $mode = Preview2::MODE_FILL) { + public function getPreview($width = -1, $height = -1, $crop = false, $mode = Generator::MODE_FILL) { if (!$this->previewManager->isMimeSupported($this->file->getMimeType())) { throw new NotFoundException(); }