userFolder = $serverContainer->getUserFolder($UserId); } /** * @NoAdminRequired * @NoCSRFRequired */ public function getByPath($path) { if (!$this->userFolder) { return new NotFoundResponse(); } try { $node = $this->userFolder->get($path); } catch (NotFoundException $e) { return new NotFoundResponse(); } $content = $node->getContent(); $mimetype = $node->getMimeType(); $this->returnRawResponse($content, $mimetype); } }