From a4261e80b0dea677e1e9db75e186bd9bb75d00fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 15 Jun 2020 12:35:03 +0200 Subject: Pass path to rich workspaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/WorkspaceController.php | 3 ++- lib/Service/WorkspaceService.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Controller/WorkspaceController.php b/lib/Controller/WorkspaceController.php index 8e9f43685..37406925d 100644 --- a/lib/Controller/WorkspaceController.php +++ b/lib/Controller/WorkspaceController.php @@ -123,7 +123,8 @@ class WorkspaceController extends OCSController { 'file' => [ 'id' => $file->getId(), 'mimetype' => $file->getMimetype(), - 'name' => $file->getName() + 'name' => $file->getName(), + 'path' => $file->getPath() ], 'folder' => [ 'permissions' => $folder->getPermissions() diff --git a/lib/Service/WorkspaceService.php b/lib/Service/WorkspaceService.php index ae5d57f60..5e4ff75e7 100644 --- a/lib/Service/WorkspaceService.php +++ b/lib/Service/WorkspaceService.php @@ -23,6 +23,10 @@ class WorkspaceService { $this->l10n = $l10n; } + /** + * @param Folder $folder + * @return \OCP\Files\File + */ public function getFile(Folder $folder) { foreach ($this->getSupportedFilenames() as $filename) { if ($folder->nodeExists($filename)) { -- cgit v1.2.3