From 9e3d6c7dbc0b697cf0f478839465dd81d7e9b43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 9 Jun 2020 18:56:32 +0300 Subject: [PATCH] Added section: Configuring the Containers --- docs/en/Blob-Storing.md | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/en/Blob-Storing.md b/docs/en/Blob-Storing.md index b63cda28d5..bf359a80c3 100644 --- a/docs/en/Blob-Storing.md +++ b/docs/en/Blob-Storing.md @@ -209,6 +209,62 @@ Naming BLOBs has not a forcing rule. A BLOB name is just a string. However, diff ## Configuring the Containers +Containers should be configured before using them. The most fundamental configuration is to select a BLOB storage provider (see the "*BLOB Storage Providers*" section above). + +`AbpBlobStoringOptions` is the [options class](Options.md) to configure the containers. + +### Configure a Single Container + +````csharp +Configure(options => +{ + options.Containers.Configure(container => + { + //TODO... + }); +}); +```` + +This example configures the `ProfilePictureContainer`. You can also configure by the container name: + +````csharp +Configure(options => +{ + options.Containers.Configure("profile-pictures", container => + { + //TODO... + }); +}); +```` + +### Configure the Default Container + +````csharp +Configure(options => +{ + options.Containers.ConfigureDefault(container => + { + //TODO... + }); +}); +```` + +> There is a special case about the default container; If you don't specify a configuration for a container, it **fallbacks to the default container configuration**. This is a good way to configure defaults for all containers and specialize configuration for a specific container when needed. + +### Configure All Containers + +````csharp +Configure(options => +{ + options.Containers.ConfigureAll((containerName, containerConfiguration) => + { + //TODO... + }); +}); +```` + +This is a way to configure all the containers. The main difference from configuring the default container is that you override the configuration even if it was specialized for a specific container. + ## Implementing Your Own BLOB Storage Provider TODO \ No newline at end of file