aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2020-12-10 15:32:33 +0100
committerRichard Steinmetz <richard@steinmetz.cloud>2020-12-10 16:37:46 +0100
commitf56eb82dddd34d4d9ad317333233c3041f07d974 (patch)
treebb3ddf5fa7c764d0428d961aaef83d6876f6dbfe
parent27fdc6575d71a039db75164842263a1ed864ca47 (diff)
downloadnextcloud-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.php1
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];