diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2020-12-10 15:32:33 +0100 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2020-12-10 16:37:46 +0100 |
commit | f56eb82dddd34d4d9ad317333233c3041f07d974 (patch) | |
tree | bb3ddf5fa7c764d0428d961aaef83d6876f6dbfe | |
parent | 27fdc6575d71a039db75164842263a1ed864ca47 (diff) | |
download | nextcloud-server-f56eb82dddd34d4d9ad317333233c3041f07d974.tar.gz nextcloud-server-f56eb82dddd34d4d9ad317333233c3041f07d974.zip |
Indicate preview availability in recent file api responses
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
-rw-r--r-- | apps/files/lib/Controller/ApiController.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index f7a0674eff0..95ee1450e2b 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -179,6 +179,7 @@ class ApiController extends Controller { /** @var \OC\Files\Node\Node $shareTypes */ $shareTypes = $this->getShareTypes($node); $file = \OCA\Files\Helper::formatFileInfo($node->getFileInfo()); + $file['hasPreview'] = $this->previewManager->isAvailable($node); $parts = explode('/', dirname($node->getPath()), 4); if (isset($parts[3])) { $file['path'] = '/' . $parts[3]; |