Skip to content

Commit

Permalink
Merge pull request #523 from hopleus/bugfix/fix-redirect-url-federati…
Browse files Browse the repository at this point in the history
…on-sharing

Fixed remote redirect URL for federation shared files
  • Loading branch information
blizzz authored Mar 11, 2024
2 parents cfbdda4 + 395a919 commit fe4262e
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 . '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() !== '') {
Expand Down

0 comments on commit fe4262e

Please sign in to comment.