We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When discussing with @tobiasKaminsky we figured out we could potentially send back the remote URL directly for direct editing to avoid a redirect
Potential patch needs testing:
diff --git a/lib/Controller/OCSController.php b/lib/Controller/OCSController.php index 50504f15..cd0b65cb 100644 --- a/lib/Controller/OCSController.php +++ b/lib/Controller/OCSController.php @@ -119,15 +119,15 @@ class OCSController extends \OCP\AppFramework\OCSController { } $node = $nodes[0]; - if ($node instanceof Folder) { + if (!$node instanceof File) { throw new OCSBadRequestException('Cannot view folder'); } $direct = $this->directMapper->newDirect($this->userId, $fileId); - + $federatedUrl = $this->federationService->getRemoteRedirectURL($node, $direct); return new DataResponse([ 'url' => $this->urlGenerator->linkToRouteAbsolute('richdocuments.directView.show', [ - 'token' => $direct->getToken() + 'token' => $federatedUrl ?: $direct->getToken(), ]) ]); } catch (NotFoundException $e) {
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When discussing with @tobiasKaminsky we figured out we could potentially send back the remote URL directly for direct editing to avoid a redirect
Potential patch needs testing:
The text was updated successfully, but these errors were encountered: