1. After generating documents with docbuilder interface,

  1. Invoke docbuilder interface to generate document
{
    "key": "bld_860fb4d98bff0145",
    "urls": {
        "SampleText.docx": "https://xx/cache/files/data/bld_860fb4d98bff0145/output/SampleText.docx/SampleText.docx?md5=sMLC2dFYGy1a9IKuZxEmjw&expires=1733385244&filename=SampleText.docx"
    },
    "end": true
}

得到key,urls

  1. An error message is displayed during preview
window.docEditor = new DocsAPI.DocEditor("placeholder",
            {
                "document": {
                    "fileType": "docx",
                    "key": "bld_860fb4d98bff0145",
                    "title": "SampleText.docx",
                    "url": 'https://xx/cache/files/data/bld_860fb4d98bff0145/output/SampleText.docx/SampleText.docx?md5=sMLC2dFYGy1a9IKuZxEmjw&expires=1733385244&filename=SampleText.docx'
                },
                "documentType": "word",
                "editorConfig": {
                    "mode": "view",
                },
                "height": "100%",
                "width": "100%",
                "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb2N1bWVudCI6eyJmaWxlVHlwZSI6ImRvY3giLCJrZXkiOiJibGRfZTA4ODU1OTkzZTI3ZTU2OCIsInRpdGxlIjoiU2FtcGxlVGV4dC5kb2N4IiwidXJsIjoiaHR0cHM6Ly9vbmx5b2ZmaWNlLmNwc29sLm5ldC9jYWNoZS9maWxlcy9kYXRhL2JsZF9lMDg4NTU5OTNlMjdlNTY4L291dHB1dC9TYW1wbGVUZXh0LmRvY3gifSwiZG9jdW1lbnRUeXBlIjoid29yZCIsImVkaXRvckNvbmZpZyI6eyJtb2RlIjoidmlldyJ9LCJ3aWR0aCI6IjEwMCUiLCJoZWlnaHQiOiIxMDAwJSJ9.MuYlDz5U-Y624-qH-vgy72GWYgLzlfaNvxQ0ap2hM-A"
            });

Prompt error:
An error has occurred while opening the file.

Could you tell me what caused the problem,thank you

Hi @css :handshake:

  • Check browser console when opening a document for editing:
  1. Open a document and wait until page is loaded;
  2. Open browser console (F12 in most browsers);
  3. Reload page with opened browser console.

Once page is loaded again, check Console and Network tabs for any error entries. If there are any, please make screenshots of them.

upd.

The keys in your example and in your token are indeed different.

In your example: bld_860fb4d98bff0145
In your token: bld_e08855993e27e568

The links also differ:

Example: https:// xx/cache/files/data/bld_860fb4d98bff0145/output/SampleText.docx/SampleText.docx?md5=sMLC2dFYGy1a9IKuZxEmjw&expires=1733385244&filename=SampleText.docx

Token: https:/ /xx/cache/files/data/bld_e08855993e27e568/output/SampleText.docx