Do you want to: Ask a how-to question
Document Server version: 9.0.4(docker)
Additional information:
Hello,
I am trying to add a feature for referencing external data by following this document:
However, I am a bit confused about the referenceData.fileKey described in the documentation.
According to the document, fileKey is referred to as a unique document identifier, with examples such as a key value:
Of course, this may vary depending on how the integration is implemented, but I believe that when opening a document, additional information such as the document key or other details might be required. I thought this information could be stored in referenceData, but it seems that only referenceData.fileKey and referenceData.instanceId are actually recognized, while other fields are not reflected.
This makes me wonder whether I should include the required information inside referenceData.fileKey. At the same time, the way the documentation explains it gives me the strong impression that fileKey is intended purely as a unique identifier for retrieving the file link.
So, I would like to confirm: is it the correct and intended way in OnlyOffice to put additional information required for opening a document into referenceData.fileKey?
I have reviewed the content of the link you provided, but I still have some questions.
The link also explains that fileKey is a Unique key .
In that case, is it acceptable to use a JSON string as shown below, as long as the value is unique?
However, the parameter name fileKey and the description of it as a “unique identifier” in the official documentation are somewhat confusing.
I would like to confirm whether using a JSON string to store the actual required data is an intended usage.
This is not intended way to manage the data. It’s just an identifier for the document you are referencing.
If you are not trying to reference another document inside currently opened one, then only document.key can be provided. Otherwise, both are required with unique values.