Create FileSystemConfiguration Components
You can use your cloud storage for storing all binary objects, or you
can choose to store only selected types of binary objects in the cloud.
You can also choose to store different types of objects in different
cloud locations, in which case you will need to create more than one
FileSystemConfiguration
component. Commonly used
configurations are:
-
All binary objects are stored in the cloud
-
Videos are stored in the cloud, all other types of binary object are stored locally. This is a common requirement since version 3.0+ of the CUE Video plug-in requires all videos to be stored in Amazon S3.
-
Video key frames are stored in a separate read-only file system in the cloud.
A read-only file system is one where the Content Store is not responsible for writing files to the cloud location. It simply records the file locations so that they can be retrieved when required. Read-only file systems are currently only used in combination with the Video plug-in. The Amazon Elastic Transcoder can generate images called key frames, which it stores in the cloud. A read-only file system is set up to point directly to this location so that the key frame files can be made known to the Content Store without copying them to a new location in the cloud. For further information, see the Video plug-in documentation.
To create a FileSystemConfiguration
component:
-
Create a configuration-root
/com/escenic/storage/filesystems/
component-name.properties
file. component-name should describe the purpose of the file system you are configuring. If you are going to use the file system to store videos, for example, then you might call your componentVideoFileSystemConfiguration
. -
Make sure the file contains at least the following entries:
$class=com.escenic.storage.FileSystemConfiguration name=file-system-name baseURI=scheme://path mimeTypes=mime-type-selectors
where:
- file-system-name
-
Is an identifier for the file system:
video
, for example, if you are going to use the file system to store videos.Once you have started to use a
FileSystemConfiguration
, you must not change its name. If you do so then the Content Store will not be able to locate the files stored in it. - scheme
-
Is the URL scheme name:
s3
, for example. You will use this name again when you configure theStorage
component (see Configure the Storage Component). - mime-type-selectors
-
A comma-separated list of MIME type specifications for selecting the file types to be stored in this file system. For example:
*
to select all file typesvideo/*
to select all video file typesvideo/mp4
to select only MP4 videosAny binary files that are not selected may be selected by a different
FileSystemConfiguration
(if you have defined others). See Configure the Storage Component for more about how this works. Any files that are not selected by anyFileSystemConfiguration
will be stored in the default local binary file store.
-
You should also add a
localCacheDirectory
entry to the file:localCacheDirectory=cache-path
where cache-path is the path of a local temporary folder (
/tmp/storage/cache/video/
, for example) to be used as a cache. Since media files tend to be large, you should choose a location with plenty of available space. Note that if you don't specify this property, then a cache is created in your Tomcat folder, which may not have sufficient available space. -
For a file system that will be used to hold video key frames created by the Amazon Elastic Transcoder, add the following property:
readOnly=true