mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-17 21:12:14 +01:00
Merge pull request #5116 from nextcloud/fix/document-target
This commit is contained in:
commit
d096ab4e19
2 changed files with 14 additions and 1 deletions
|
|
@ -401,8 +401,20 @@ class DocumentController extends Controller {
|
|||
|
||||
$this->tokenManager->setGuestName($wopi, $guestName);
|
||||
|
||||
$params = [
|
||||
'urlSrc' => $this->tokenManager->getUrlSrc($file)
|
||||
];
|
||||
|
||||
$targetData = $this->session->get(self::SESSION_FILE_TARGET);
|
||||
if ($targetData) {
|
||||
$this->session->remove(self::SESSION_FILE_TARGET);
|
||||
if ($targetData['fileId'] === $fileId) {
|
||||
$params['target'] = $targetData['target'];
|
||||
}
|
||||
}
|
||||
|
||||
return new DataResponse(array_merge(
|
||||
[ 'urlSrc' => $this->tokenManager->getUrlSrc($file) ],
|
||||
$params,
|
||||
$wopi->jsonSerialize(),
|
||||
));
|
||||
} catch (Exception $e) {
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ export default {
|
|||
revisionHistory: !this.isPublic,
|
||||
closeButton: !Config.get('hideCloseButton') && !this.isEmbedded,
|
||||
startPresentation: Config.get('startPresentation'),
|
||||
target: data.target,
|
||||
})
|
||||
this.$set(this.formData, 'action', action)
|
||||
this.$set(this.formData, 'accessToken', data.token)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue