Storage providers for libraries
Using storage providers for libraries, allow you to store images, videos, documents and other files in a separate storage from the database. This is useful when you need to store big chunk of data. Storing it in the database is not cost effective, because as it has to be processed by Sitefinity CMS and results in excessive calls to the database. In these cases, it may be easier to keep the metadata information for the files in the database and store the actual files in the file system or in a cloud storage. The metadata is always stored in the database, while the binary data, known as BLOB (Binary Large Object) may be stored differently – in the database, on the file system, or in a cloud storage.
Each blob storage provider in the system has a unique name. Each library is associated with a single blob storage provider, which is specified when the library is created and which is used to manage the storage of the items in that library. The library keeps the name of its blob storage provider. The blob storage provider can also be set for individual library items, but currently this is not supported by the user interface.
You configure storage providers in the following way:
- In the main menu, click Administration » Settings.
The Basic Settings page appears.
- Click Storage providers for Libraries.
By default two storage providers exist:
- Database
Items are stores in your projects database.
This provider is the default.
- File System
Items are stored in your projects folder ~\App_Data\Storage\FileSystem.
To make this the default storage, click Set as default.
NOTE: To be able to seek through video or audio files, use the File System built-in storage provider.
In addition, to enable streaming of videos in iOS, use the File System built-in storage provider for the Video library. For more information, Stream videos in iOS.
Create a new storage provider
-
To create a new storage provider, click Add storage provider button.
The Add a provider window appears.
-
Enter a name for the provider.
- In Provider type dropdown, select one of the following:
- Database
-
Click Continue.
-
On the next screen, select a database where you want to store the files.
The dropdown box contains all databases that you have configured.
-
File System.
- Click Continue.
-
Enter the folder path where you want to store the files.
- To check if you have access to the database or the folder, click Test settings.
A test status message appears.
-
Click Done.
The new storage provider appears in the list of providers.
Editing storage providers