Custom File Storage in Creatio

Hi Community,

 

I have a question regarding customization file storage in Creatio. Is it possible to save files directly in the file system instead of the database (default)? 

I came across documentation on "Implementing a custom file storage," but I'm unsure whether these customizations affect the location where files are stored, or if they only modify the file metadata.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Additionally, is it possible to customize the format in which the file is saved? 

By default, files are saved as BLOBs (In Database). However, if we want to store files in the same format but directly in the file system rather than as BLOBs, would that be possible in Creatio?

Like 0

Like

1 comments

Hello, 

The "Implementing a custom file storage" documentation you referenced utlines how to achieve this, and it does indeed allow you to change the location where files are stored. 

 

The process involves implementing a custom file storage system using file management API. Specifically, you can:

 

This interface defines how file content is stored and retrieved. By creating a custom class that implements this interface, you can direct to save files to a file system instead of the database. For example, you could write a class that saves files to a specified directory on the server’s file system.
 

After implementing the storage logic, you register it in SysFileContentStorage lookup, which tells the system to use your custom storage for file operations.


How to check:


 

You’ll also need a custom file locator (implementing IFileLocator) to specify where files are stored in the file system, and optionally a custom metadata storage (implementing IFileMetadataStorage) if you need to tweak how metadata is handled. 


Our documentation explains more about it: 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/back-end-development/api-for-file-management/overview
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/references/ifilecontentstorage
EntityFileLocator class | Creatio Academy

Regards,
Orkhan
 

Show all comments