fix: force-reload ONLYOFFICE API.js each session + Date.now for truly unique doc key
This commit is contained in:
Binary file not shown.
@@ -6,6 +6,6 @@
|
||||
"originalName": "master_cv_template.docx",
|
||||
"path": "/root/workspace/cv-app/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx",
|
||||
"uploadedAt": "2026-07-16T09:03:29.601Z",
|
||||
"updatedAt": "2026-07-16T11:23:15.854Z"
|
||||
"updatedAt": "2026-07-16T11:52:26.701Z"
|
||||
}
|
||||
]
|
||||
@@ -143,7 +143,8 @@ router.get('/:templateId/config', (req, res) => {
|
||||
// Get file modification time for cache-busting doc key
|
||||
const fileStats = fs.statSync(template.path);
|
||||
const fileMtime = fileStats.mtimeMs;
|
||||
const docKey = generateDocKey(templateId, fileMtime);
|
||||
// Use Date.now() as the primary uniqueness driver — guaranteed fresh every time
|
||||
const docKey = generateDocKey(templateId, Date.now());
|
||||
const fileName = template.originalName || template.name + '.docx';
|
||||
|
||||
// Add file mtime as cache-buster to the document URL so ONLYOFFICE
|
||||
|
||||
Reference in New Issue
Block a user