"The file version has been changed. The page will be reloaded."
I am trying to integrate our document storage service. As a test case I have set up callbackURL endpoint to simply dump all input to log file and always respond with '{ "error" : 0 }'. The problem occurs after I edit the file, close page and wait for callbackURL to be called with "status":2. Then I open same page again and that error message is prompted. I suspect that I need to modify the
object somehow, after document was edited, to address the new version. But how to do that? Which property should be added to open the edited file without an error?config
Here's my minimal test page:
- Code: Select all
<html>
<div id="placeholder"></div>
<script type="text/javascript" src="http://example.com/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript">
new DocsAPI.DocEditor("placeholder", {
"documentType": "text",
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd79",
"title": "Example Document Title.docx",
"url": "http://example.com/demo.docx",
"permissions": {
"download": true,
"edit": true,
"print": true,
"review": true,
},
},
"editorConfig": {
"callbackUrl": "http://example.com/only_office_callback",
"mode": "edit",
"user": {
"firstname": "John",
"id": "78e1e841",
"lastname": "Smith",
},
},
});
</script>
</html>