issue regarding Document opening and key generation

Integration questions/issues
Post Reply
umesh.markande
Posts: 2
Joined: Mon Jul 16, 2018 7:18 am

issue regarding Document opening and key generation

Post by umesh.markande » Mon Jul 16, 2018 9:47 am

Hi,

I have integrated onlyoffice into my project, I have successfully uploaded the document file on onlyoffice document server and response containt webURL and viewURL.
But when i want to preview that file on dialog the file is not opening or not anything display on dialog.
Please refer the below code

Code: Select all

let uuuid = Guid.newGuid().substring(1, 20);
      let config = {
        "document": {
          "fileType": 'docx',
          "key": uuuid,
          "title": 'document.docx',
          "url": "http://(document server)/products/files/httphandlers/filehandler.ashx?action=stream&fileid=16"
        },
        "documentType": "text",
      };
      var docEditor = new DocsAPI.DocEditor("placeholder", config);
Also in above code i have generated Key using Guid, is this correct way or can you please provide me key generation code in Spring hiberante,
I have also integrated java code example(for generate revision id ) that you have provided but it is also not working.

Can you please cor-rectify where i am wrong.
Please refer the below screenshot.
Attachments
viewer.png
viewer.png (43.67 KiB) Viewed 558 times

Maxim
Posts: 1843
Joined: Tue Oct 11, 2016 2:34 pm

Re: issue regarding Document opening and key generation

Post by Maxim » Mon Jul 16, 2018 10:54 am

Hello umesh.markande!
1. You should not generate key on the fly because you will not able to use the same key for the collaborative editing.
2. There are 32 errors on your screenshot - please show them.
It is not clear why you cannot preview that file on dialog

umesh.markande
Posts: 2
Joined: Mon Jul 16, 2018 7:18 am

Re: issue regarding Document opening and key generation

Post by umesh.markande » Mon Jul 16, 2018 11:18 am

Hi,

Actually the 32 errors are local image not loaded properly so that it was showing, but it was not related onlyoffice integration,
You should not generate key on the fly because you will not able to use the same key for the collaborative editing.
As you stated that not able to use same key, the UUID generate new key every time when i preview that file.
You should not generate key on the fly
So can you please suggest me how to generate key in spring or Angular framework.
Because i want shown file on dialog for edit and save purpose can you help me.
It is not clear why you cannot preview that file on dialog
Actually i am previewing that file on dialog, I am not understand your question.

Thank you

Post Reply