guideDocument storage

# Overview

This feature allows you to permanently save the document data in CKEditor Cloud Services. When enabled, documents are no longer stored temporarily just for the duration of the document session lifetime. Instead, they are saved permanently in the CKEditor Cloud Services server.

When a user connects to a previously existing document for which a collaboration session has already expired, the document is automatically loaded into the collaboration session.

This feature is in beta version. If you want to enable it, please contact us.

# Benefits of the document storage feature

  • Reduced number of requests to your server. Collaborating users no longer need to send the document data in time intervals.
  • Your server is completely excluded from the responsibility of saving the document.
  • The process of saving the document data is independent of the users’ or your server’s network conditions.
  • No need to check whether a collaborative document session currently exists.
  • No need to load the current content of the document in case the collaboration session has expired.
  • No race condition problem when saving the document data.
  • Documents are saved in an encrypted form.
  • It is possible to get or delete documents from the storage or get the documents list.

# Requirements

Follow the steps below to set up the document storage feature.

  1. Set the required bundleVersion property in the editor configuration. Refer to the Editor configuration section of the Editor bundle documentation for more details.

  2. Upload your editor bundle with the editor configuration to the CKEditor Cloud Services server. Refer to the Editor bundle guide for more information.

  3. Contact us to enable the document storage feature for your environment(s).

Remember that the document storage feature works only for the environment where it was turned on. If you use many environments, you must enable it separately for each of them.

# Usage

# Saving the document

After fulfilling the requirements above, the documents will be saved automatically. When using this feature, your users collaborate in the document as they did before, but there is no need to use your server as a database for document data.

# Document management

Managing stored documents involves using methods available from the REST API level in the Documents section.

Available methods:

  • GET /documents/{document_id} – Gets the data of a single document that is saved in the storage.
  • GET /documents – Gets the list of document IDs that are saved in the storage.
  • DELETE /documents/{document_id} – Deletes a single document from the storage.

# Document storage webhooks

You can receive information about the processing of your document in the document storage in the form of webhook events. Refer to the Document storage events section for more details.

# Example

Check an example of an application that uses the document storage feature in Node.js and Express.js.

Also, you can check CKEditor Cloud Services samples repository, where you can find more examples.