简体   繁体   中英

Django integration with onlyoffice

I am trying to integrate onlyoffice with my Django UI. I have hosted community server on my local network 192.168.2.103. script is follows for opening the doc:

    <script type="text/javascript">

        config = {
            "document": {
                "fileType": "docx",
                "key": "apiwhV2mE0Z44ImHxbibRMdwd_",
                "title": "Example Document Title.docx",
                "url": "https://d2nlctn12v279m.cloudfront.net/assets/docs/samples/demo.docx",
            },
            "documentType": "text",
            "editorConfig": {
                "callbackUrl": "http://192.168.2.103/url-to-callback.ashx"
            }
        };

        window.docEditor = new DocsAPI.DocEditor("placeholder", config);
    </script>

My question is :

  • Unable to open my local document in onlyoffice ui which is available on " http://localhost:8000/static/mydoc.docx " while " https://d2nlctn12v279m.cloudfront.net/assets/docs/samples/demo.docx " is working fine. (both the docs are downloadable from link)

  • What is the use of "key" and how to find or generate it ("key": "apiwhV2mE0Z44ImHxbibRMdwd_").

  • How I will integrate the doc which is created on my server (192.168.2.103). Unable to get the direct file link for it. How i will control its editing if it it shared with some specific only office users on my portal.

Unable to open my local document in onlyoffice ui which is available on " http://localhost:8000/static/mydoc.docx " while " https://d2nlctn12v279m.cloudfront.net/assets/docs/samples/demo.docx " is working fine. (both the docs are downloadable from link)

The file should be available for downloading from the DocumentServer (Just make sure that you can download the file using that link when you are on the server or inside the container with DocumentServer)

What is the use of "key" and how to find or generate it ("key": "apiwhV2mE0Z44ImHxbibRMdwd_").

Follow the link to find all information about the key

How I will integrate the doc which is created on my server (192.168.2.103). Unable to get the direct file link for it. How i will control its editing if it it shared with some specific only office users on my portal.

Here you can find the list of all available parameters and their description that can be sent to the callbackurl address. (document status, list of users, changes history)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM