Browse Source

Indicate preview availability in recent file api responses

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
tags/v21.0.0beta1
Richard Steinmetz 3 years ago
parent
commit
f56eb82ddd
No account linked to committer's email address
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      apps/files/lib/Controller/ApiController.php

+ 1
- 0
apps/files/lib/Controller/ApiController.php View File

@@ -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];

Loading…
Cancel
Save