Skip to content

Configuration

Galo edited this page Jun 2, 2017 · 1 revision
{
  "ConnectionStrings": {
    "ConnectionStringFromAppSettings": "DefaultEndpointsProtocol=https;AccountName=<YourAccount>;AccountKey=<YourKey>;EndpointSuffix=core.windows.net"
  },

  "Storage": {

    "Providers": {
      "FirstAzure": {
        "Type": "Azure",
        "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=<YourAccount>;AccountKey=<YourKey>;EndpointSuffix=core.windows.net"
      },
      "AnotherAzure": {
        "Type": "Azure",
        "ConnectionStringName": "ConnectionStringFromAppSettings"
      },
      "FirstFileSystem": {
        "Type": "FileSystem"
      },
      "AnotherFileSystem": {
        "Type": "FileSystem",
        "RootPath": "../FileVault2"
      }
    },

    "Stores": {
      "Store1": {
        "ProviderName": "FirstFileSystem"
      },
      "Store2": {
        "ProviderName": "FirstFileSystem",
        "AccessLevel": "Public",
        "FolderName": "AnotherPath"
      },
      "Store3": {
        "ProviderName": "FirstAzure",
        "AccessLevel": "Private"
      },
      "Store4": {
        "ProviderType": "Azure",
        "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=<YourAccount>;AccountKey=<YourKey>;EndpointSuffix=core.windows.net"
      },
      "Store5": {
        "ProviderName": "AnotherAzure"
      },
      "Store6": {
        "ProviderType": "Azure",
        "ConnectionStringName": "ConnectionStringFromAppSettings"
      }
    },

    "ScopedStores": {
      "ScopedStore1": {
        "ProviderName": "AnotherFileSystem",
        "FolderNameFormat": "AnotherPath-{0}"
      },
      "ScopedStore2": {
        "ProviderName": "AnotherAzure",
        "AccessLevel": "Confidential",
        "FolderNameFormat": "AnotherPath-{0}"
      }
    }
  }
}

Global:

  • Provider-level configuration available
  • Flattened store-level configuration (aka no more 'Parameters')
  • Mandatory keys for a Store:
    • Either ProviderName
    • Or ProviderType and provider's configuration keys
  • Container and Path merged into one single configuration key: FolderName. If not specified, the name of the Store is taken.
  • AccessLevel: used to define the Azure container public access level, or if the Store may be exposed by the FileSystem server. Available values are:
    • Public: map to BlobContainerPublicAccessType.Container, can list store and read files
    • Confidential: map to BlobContainerPublicAccessType.Blob, can read files
    • Private (default): map to BlobContainerPublicAccessType.Off, no access

ScopeStores:

  • FolderNameFormat is mandatory to initialize a Store with params (for example one store per user)
  • All other Stores' parameters are available

FileSystem:

  • RootPath can now be set from configuration at provider-level

Azure:

  • ConnectionString is now defined at provider-level
  • It can be replaced with ConnectionStringName if we call an override to AddAzureStorage which take a configuration section to pass the default ConnectionStrings section of the appsettings.json
  • At Store-level, if we do not want to reference a named provider, we can either set ConnectionStringName or ConnectionString
Clone this wiki locally