Cloud Computing Insider Awards 2022: Vote for ONLYOFFICE
Vote for ONLYOFFICE

Are we supposed to save the document versions in our server i.e "example.com" url, or verisons cache are saved forever in "documentserver" url that gets returned on history object?

I am setting history this way:

docEditor.setHistoryData({
        "changesUrl": "https://documentserver/url-to-changes.zip",
        "key": "2745492410",
        "previous": {
            "key": "af86C7e71Ca8",
            "url": "https://documentserver/url-to-the-previous-version-of-the-document.docx"
        },
        "url": "https://documentserver/url-to-edited-document.docx",
        "version": version
    })

where the changesUrl and URL that I am passing is the same changesUrl and URL I am getting from the history object from the callback url i.e when the doc is saved.

But this way, I am getting error and version isn’t set, which makes me think I should have saved the changesUrl and url in my own server and pass the urls in my server to setHistoryData.
I am lost, It would be a big help. Thank you

Hello @bipana.shrestha

Are we supposed to save the document versions in our server i.e “example.com” url, or verisons cache are saved forever in “documentserver” url that gets returned on history object?

You have to implement storage of different file versions on your side, this is your task as an independent integrator. Please take a look at these titles:
https://api.onlyoffice.com/editors/history
https://api.onlyoffice.com/editors/save

As for cache, Document server is just an editor in fact. it doesn’t contain data. When editing session is over, cache will be removed shortly.
If I misunderstood your request, please provide details.