diff --git a/lib/Service/FederationService.php b/lib/Service/FederationService.php index 2e78a1c5f..be9d64bd2 100644 --- a/lib/Service/FederationService.php +++ b/lib/Service/FederationService.php @@ -139,7 +139,8 @@ public function getRemoteRedirectURL(File $item, $direct = null) { } else { $wopi = $this->tokenManager->getRemoteTokenFromDirect($item, $direct->getUid()); } - $url = $remote . 'index.php/apps/officeonline/remote?shareToken=' . $item->getStorage()->getToken() . + + $url = rtrim($remote, '/') . '/index.php/apps/officeonline/remote?shareToken=' . $item->getStorage()->getToken() . '&remoteServer=' . $wopi->getServerHost() . '&remoteServerToken=' . $wopi->getToken(); if ($item->getInternalPath() !== '') {