Skip to content

Commit

Permalink
Fixed remote redirect URL for federation shared files (Refactoring)
Browse files Browse the repository at this point in the history
Signed-off-by: hopleus <[email protected]>
  • Loading branch information
hopleus committed Feb 29, 2024
1 parent e4e0767 commit 6148b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/FederationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public function getRemoteRedirectURL(File $item, $direct = null) {
} else {
$wopi = $this->tokenManager->getRemoteTokenFromDirect($item, $direct->getUid());
}
$url = $remote . '/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() !== '') {
Expand Down

0 comments on commit 6148b21

Please sign in to comment.