Configure the Storage Component

  1. Open configuration-root/com/escenic/storage/Storage.properties for editing.

  2. Add the following property to register your S3FileProvider component:

    fileProvider.scheme=./aws/S3FileProvider

    where:

    • scheme is the URL scheme name (s3, for example). It must match the scheme name you have used in the baseURI property values in your FileSystemConfiguration components.

  3. Add the following property to register the FileSystemConfigurations you want to use.

    fileSystemConfigurations=configuration-path[, configuration-path[,...]]

    The value of this property is a comma-separated list of paths to the FileSystemConfiguration components you have configured. For example:

    fileSystemConfigurations=./filesystems/VideoFileSystemConfiguration, ./filesystems/BinaryFileSystemConfiguration

    Note that the order in which you specify the components is significant. Assuming that VideoFileSystemConfiguration is configured with the MIME type selector video/* and BinaryFileSystemConfiguration is configured with the MIME type selector * then the above setting will work as intended: any video files will be caught by the video/* selector and stored in the video file system. All other files will not be selected, and will instead be caught by the * selector and stored in the generic binary file system. If the components were specified in the reverse order, however, then all files would be selected by the * selector and nothing would ever be stored in the video file system.

    If none of the components specified in the list specifies a * selector, then any binary files not selected by one of the components in the list will be stored in the default local binary file store.

    The component sequence only matters when storing binary files, so the position of a read-only component in the list has no significance - you can put a read-only component in any position.

Your remote storage set-up is now complete.

If you want to revert to using local storage for all files, you can do so by simply removing the fileProvider.scheme and fileSystemConfigurations properties from this file. You will also need to download any binary files that have been stored in the bucket and return them to the appropriate location in your local file system.