We are using the Only Office Community edition and was wondering if there is a way to get the current document content which is in the cache (what the user edited as of now).
We know that on callback it returns the URL BUT we need some way to access the temporary file as well, without waiting the finish.
We know about forcesave as well but I was hoping that there was an alternative to this to access the temporary file (endpoint, direct URL, how to make the direct URL etc).
Hello @r-a-tutsek,
Unfortunately, it is not possible to retrieve a cached version of the file.
In our product, intermediate changes to the file are stored in the database rather than in a cached copy. Once any saving mechanism is initiated, the output file is assembled from the original document and the changes from the database and you receive a URL to it.
Thank you for your reply, but my question is isn’t there an endpoint that if I call it assembles the file and returns its content?
For now the only alternative I found is calling downloadAs and passing the resulted url… But I need to achieve this by calling an endpoint on the documentserver preferabily…
I have succeeded in the end with a combination of forcesave triggered by Api command and downloadAs which gives me links, I had 2 specific use cases: save and preview.
The next step would be to convert the file but I have the file content… I need to convert it without specifying a url, can this be done?
Hello @r-a-tutsek
In ONLYOFFICE Docs, file conversion typically requires specifying the URL of the source document. However, if you have the file content as a byte array, you can save it on the server and then pass the URL of the saved file to the API for conversion.
Unfortunately, direct conversion of file content without saving it on the server and specifying a URL is not supported in ONLYOFFICE Docs. It is recommended to save the file on the server and use its URL for subsequent conversion via the API.