Try our conversational search powered by Generative AI!

Loading...
Applies to versions: 10.x
Other versions:
ARCHIVED This content is retired and no longer maintained. See the version selector for other versions of this topic.

Storing data [Legacy]

Recommended reading 

Note: This functionality is retired, and the documentation is no longer maintained.

Note: The functionality described in this article is not available in Commerce versions 11 and up. Episerver uses the Episerver asset system by default. If you want to enable the legacy asset management system, set the UseLegacyAssetSystem configuration setting to true in the web.config files of both the Commerce Manager and the front-end sites. 

Episerver Commerce provides several options for storing assets. Episerver Commerce comes with providers for file storage, MSSQL storage, and Amazon S3. You can also create your own asset management provider.

Classes in this topic are available in the following namespaces:

  • Mediachase.Commerce.Assets
  • Mediachase.BusinessFoundation.Blob
  • Mediachase.Library.AmazonProviders

Key classes and files

  • ecf.asset.config
  • S3DownloadProfile
  • AssetConfiguration (in Configuration.cs)
  • S3StorageProvider
  • SqlBlobStorageProvider
  • PublicDiskBlobStorageProvider
  • FolderElementEntity

Configuration

In your Episerver Commerce site's web.config file, under the element section, the AssetManagement element points to the file ecf.asset.config.CommerceFramework.

In ecf.asset.config, you can declaratively specify different values for FolderProviders, DownloadFilters, and ElementTypes. These are made accessible through the static Instance property of the AssetConfiguration class.

What these asset types do:

  • FolderProviders. Specifies locations to store the binary data.
  • DownloadFilters. Performs additional actions before item is downloaded.
  • ElementTypes. Gets the element MIME types.

Blob storage providers

SqlBlobStorageProvider and PublicDiskBlobStorageProvider extend the abstract class BlobStorageProvider, which defines a set of properties and methods for blob storing of data.

  • Mediachase.BusinessFoundation.Blob.PublicDiskStorageProvider. Stores blob data on a file system.
  • Mediachase.BusinessFoundation.Blob.SqlBlobStorageProvider. Stores blob data on a SQL database server.

Amazon S3 storage provider

S3StorageProvider extends the BlobStorageProvider abstract class, which defines a set of properties and methods for blob (binary large object) storing of data. See also Amazon Simple Storage Service (Amazon S3).

  • Mediachase.Library.AmazonProviders.S3StorageProvider. Used for storage blob data on Amazon's Simple Storage Service (S3).

Using FolderProviders

The collection of declaratively set FolderProviders is used by the FolderElementEntity class to store blob data. Operations on the blob data are abstracted away through the FolderElementEntity class's methods.

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 28, 2020

Recommended reading