diff options
Diffstat (limited to 'apps/files_sharing/lib/Controller')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 3abe4f6dbe9..2c2ec393d3f 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -62,6 +62,7 @@ use OCP\Files\NotFoundException; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; +use OCP\IPreview; use OCP\IRequest; use OCP\IServerContainer; use OCP\IURLGenerator; @@ -106,6 +107,8 @@ class ShareAPIController extends OCSController { private $serverContainer; /** @var IUserStatusManager */ private $userStatusManager; + /** @var IPreview */ + private $previewManager; /** * Share20OCS constructor. @@ -137,7 +140,8 @@ class ShareAPIController extends OCSController { IConfig $config, IAppManager $appManager, IServerContainer $serverContainer, - IUserStatusManager $userStatusManager + IUserStatusManager $userStatusManager, + IPreview $previewManager ) { parent::__construct($appName, $request); @@ -153,6 +157,7 @@ class ShareAPIController extends OCSController { $this->appManager = $appManager; $this->serverContainer = $serverContainer; $this->userStatusManager = $userStatusManager; + $this->previewManager = $previewManager; } /** @@ -213,6 +218,7 @@ class ShareAPIController extends OCSController { } $result['mimetype'] = $node->getMimetype(); + $result['has_preview'] = $this->previewManager->isAvailable($node); $result['storage_id'] = $node->getStorage()->getId(); $result['storage'] = $node->getStorage()->getCache()->getNumericStorageId(); $result['item_source'] = $node->getId(); |