Ask a how-to question
I have set up a document server in a docker locally. I have the following HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div id="placeholder"></div>
<script type="text/javascript" src="http://localhost:80/web-apps/apps/api/documents/api.js"></script>
<!-- Ensure your JS file is included after the OnlyOffice API script -->
<script type="module" src="docEditor.js"></script>
</body>
</html>
where docEditor.js
contains:
const config = {
"document": {
"fileType": extension,
"key": "Khirz6zTPdfd7",
"title": docName,
"url": url
},
"documentType": "word",
"editorConfig": {
"callbackUrl": "http://host.docker.internal:8000/track"
}
};
config.token = token;
var docEditor = new DocsAPI.DocEditor("placeholder", config);
where url
is a signed url from google cloud storage.
My issue:
- I start a docker image
- I open file A. File A opens in docEditor
- I close file A.
- I open file B, but file A opens instead.
- This continues. Until I restart docker, the same file A opens no matter what url I send.
I triple checked that I send correct urls for the documents I am trying to open.
I assume some caching is happening somewhere. I have caching disabled in my browser. I can’t get to the bottom of it.