Preview Multiple Versions
For business systems that support multiple versions of files, Filez Document Platform supports previewing different versions of the same file (same docId). For example: document name "Mid-term Report.docx", docId = anky15fhut5, with two versions version1 = tgja9ytw43, version2 = wqtubg645
For the Document Platform, docId + modified_at in meta information is used to determine a unique file entity (Document Cache).
For example: In the business system, there is a document named "Mid-term Report.docx", docId = anky15fhut5,
version1 = tgja9ytw43, modified_at="2023-03-22T10:31:38.000Z"
version2 = wqtubg645, modified_at="2023-03-22T11:33:48.000Z"
Standard Integration Mode
The url query parameter must include version for preview.
If only previewing the latest version, version can be latest. For example:
http://${zDocs_domain}/docs/app/thirdparty-rest/${docId}/view/content?version=latest
If previewing a specific version, version is tgja9ytw43. For example:
http://${zDocs_domain}/docs/app/thirdparty-rest/${docId}/view/content?version=tgja9ytw43
At this time, when Filez Document Platform calls back to the business system's meta API and GET content API, it will also include version in the url, for example:
http://my.integration.com/zoffice/files/${docId}/meta?version=tgja9ytw43
For example, if the business system returns modified_at="2023-03-22T10:31:38.000Z" in meta, and the file determined by docId + modified_at is not cached in the platform (Document Cache), the Document Platform will call the following request to download the specified version of the file
http://my.integration.com/zoffice/files/${docId}/content?version=tgja9ytw43
Frontend Integration Mode
The url query params must include version.
If previewing a specific version, version is tgja9ytw43. For example:
http(s)://${zOffice_domain}/docs/app/driver-callback?repoId=${repoId}&docId=${docId}&action=view&userinfo=${userInfo}&meta=${meta}&downloadUrl=${downloadUrl}¶ms=${params}&ts=${ts}&HMAC=${hmac}
Among them, params must include version= tgja9ytw43, and the modified_at value in meta information needs to reflect the current requested version. If the file determined by docId + modified_at is not cached in the platform (Document Cache), when the Document Platform calls the business system's downloadUrl, it will include the version parameter. The business system returns the correct version of the file based on the received parameters.