summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-12-11 12:35:28 +0100
committerGitHub <noreply@github.com>2020-12-11 12:35:28 +0100
commit32f64b68e4fd067704d927539dab4b40cc1bf3ab (patch)
tree0dc7d9f6f45206aafa14734f8d71ef292611ac0a
parentbda3d01196e16ca3b5bb9af05c5809cd40caa3a6 (diff)
parentf56eb82dddd34d4d9ad317333233c3041f07d974 (diff)
downloadnextcloud-server-32f64b68e4fd067704d927539dab4b40cc1bf3ab.tar.gz
nextcloud-server-32f64b68e4fd067704d927539dab4b40cc1bf3ab.zip
Merge pull request #24643 from nextcloud/fix/noid/recent-files-has-preview
Indicate preview availability in recent file api responses
-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];