diff --git a/js/documents.js b/js/documents.js index 7beebee4..3c44b34b 100644 --- a/js/documents.js +++ b/js/documents.js @@ -119,7 +119,7 @@ var documentsMain = { } // WOPISrc - URL that loolwsd will access (ie. pointing to ownCloud) - var wopiurl = window.location.protocol + '//' + window.location.host + OC.generateUrl('apps/richdocuments/wopi/files/{file_id}', {file_id: fileId}); + var wopiurl = window.location.protocol + '//' + window.location.host + OC.generateUrl('apps/richdocuments/wopi/files/{file_id}_{instanceId}', {file_id: fileId, instanceId: instanceId}); var wopisrc = encodeURIComponent(wopiurl); // urlsrc - the URL from discovery xml that we access for the particular diff --git a/lib/Controller/DocumentController.php b/lib/Controller/DocumentController.php index d8df677a..731f10bc 100644 --- a/lib/Controller/DocumentController.php +++ b/lib/Controller/DocumentController.php @@ -108,6 +108,7 @@ class DocumentController extends Controller { 'token' => $token, 'urlsrc' => $urlSrc, 'path' => '/', + 'instanceId' => $this->settings->getSystemValue('instanceid'), ]; $response = new TemplateResponse('richdocuments', 'documents', $params, 'empty'); @@ -157,6 +158,7 @@ class DocumentController extends Controller { 'token' => $token, 'urlsrc' => $urlSrc, 'path' => '/', + 'instanceId' => $this->settings->getSystemValue('instanceid'), ]; $response = new TemplateResponse('richdocuments', 'documents', $params, 'empty'); diff --git a/templates/documents.php b/templates/documents.php index 41e114e0..6d5dc79a 100644 --- a/templates/documents.php +++ b/templates/documents.php @@ -5,6 +5,7 @@ var richdocuments_token = ''; var richdocuments_urlsrc = ''; var richdocuments_path = ''; + var instanceId = '';