Meet Chwala! - Kolab's New File Storage Component

As you might have noticed already, some Kolab users such as the privacy asylum MyKolab.com are so dauntless and use our new file cloud already. So it is about time that we tell you all about this new feature that will officially be available in Kolab 3.1.


The new file storage is called Chwala which is the Polish word for glory. It is neatly integrated into our webclient as you can see on the screenshots on the right. But you can also access all the files via the WebDAV protocol which is made available by our new iRony which is also new in Kolab 3.1.


Also, the Chwala webclient supports more than mere access to your files. You can attach files to emails right from the file store without uploading them again and of course also save attachements directly into it.


Another feature is Virtual Collections that are supposed to ease navigation. Your files are automatically grouped into these categories:


  • Images / Pictures / Galleries
  • Music / Videos / Media
  • Documents

And all of these you can also directly display in the webclient running in your browser. At the moment, have implemented viewers for ODF and PDF documents as well as for media. Especially for the latter, we appreciate feedback for various browsers and file formats.


We have also inline editing of text files and even source code with the help of the Ace editor.


Support for different Backends


At the moment, there is only one backend responsible for actually storing the files somewhere. It uses the Kolab way and stores them in IMAP. But the Chwala API supports the creation of different storage backends. It is possible to create a driver class that will store files on any storage e.g. local filesystem. As for now it is possible to use only one storage at a time.


We appreciate and support implementations of different storage backend drivers. Please get in touch if you like to work on this. Below, we tell you how to implement your own Chwala backend.


There's currently one reference driver in Chwala - the Kolab driver. You can find it in lib/kolab directory. It's based on Roundcube Framework and plugins. The Kolab way is to store files in IMAP. The main driver file is lib/kolab/kolab_file_storage.php.


To create a new driver you need to:


  1. Create driver directory as lib/<driver_name>. This directory will be added to PHP's include path.
  2. Create lib/<driver_name>/<driver_name>_file_storage.php file. This file should define a class <driver_name>_file_storage which will implement file_storage interface (defined in lib/file_storage.php).
  3. To change the driver set 'fileapi_backend' option to the driver name in main configuration file. Default is 'kolab'.

Driver initialization


Driver object is initialized in file_api::api_init() method. After the object instance is created we call configure() method.


Driver methods


  1. configure - Is used to configure the driver.
  2. authenticate - Is used to authenticate a user in authenticate request.
  3. capabilities - Is supposed to return capabilities and limitations (like max. upload size) supported by the driver.

Other methods are self explanatory and well documented in interface class file. API documentation can be generated using phpDocumentor.