Indicate preview availability in recent file api responses
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
27fdc6575d
commit
f56eb82ddd
|
@ -179,6 +179,7 @@ class ApiController extends Controller {
|
||||||
/** @var \OC\Files\Node\Node $shareTypes */
|
/** @var \OC\Files\Node\Node $shareTypes */
|
||||||
$shareTypes = $this->getShareTypes($node);
|
$shareTypes = $this->getShareTypes($node);
|
||||||
$file = \OCA\Files\Helper::formatFileInfo($node->getFileInfo());
|
$file = \OCA\Files\Helper::formatFileInfo($node->getFileInfo());
|
||||||
|
$file['hasPreview'] = $this->previewManager->isAvailable($node);
|
||||||
$parts = explode('/', dirname($node->getPath()), 4);
|
$parts = explode('/', dirname($node->getPath()), 4);
|
||||||
if (isset($parts[3])) {
|
if (isset($parts[3])) {
|
||||||
$file['path'] = '/' . $parts[3];
|
$file['path'] = '/' . $parts[3];
|
||||||
|
|
Loading…
Reference in New Issue