Skip to content

Commit 7bdc5ba

Browse files
committed
Add documentation about configuration via web.config
1 parent 5e231ca commit 7bdc5ba

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,38 @@ Additionally the provider can be further configured with the following applicati
9494
</configuration>
9595
```
9696

97+
### Configuration via Web.Config
98+
99+
**Available in v0.5.4+**
100+
101+
Optionally instead of having the configuration in `FileSystemProviders.config` it can be moved to `Web.config`
102+
103+
In `FileSystemProviders.config` remove the default parameters and add a new one with the key `alias`, the value should match the provider alias
104+
105+
```xml
106+
<?xml version="1.0"?>
107+
<FileSystemProviders>
108+
109+
<!-- Media -->
110+
<Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
111+
<Parameters>
112+
<add key="alias" value="media"/>
113+
</Parameters>
114+
</Provider>
115+
116+
</FileSystemProviders>
117+
```
118+
119+
In `Web.config` create the new application keys and post fix each key with the `alias` defined in `FileSystemProviders.config` after a colon.
120+
121+
```xml
122+
<add key="AzureBlobFileSystem.ConnectionString:media" value="DefaultEndpointsProtocol=https;AccountName=[myAccountName];AccountKey=[myAccountKey]" />
123+
<add key="AzureBlobFileSystem.ContainerName:media" value="media" />
124+
<add key="AzureBlobFileSystem.RootUrl:media" value="http://[myAccountName].blob.core.windows.net/" />
125+
<add key="AzureBlobFileSystem.MaxDays:media" value="365" />
126+
<add key="AzureBlobFileSystem.UseDefaultRoute:media" value="true" />
127+
```
128+
97129
## Virtual Path Provider
98130
By default the plugin will serve files transparently from your domain or serve media directly from Azure. This is made possible by using a custom [Virtual Path Provider](https://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider%28v=vs.110%29.aspx) included and automatically initialised upon application startup. This can be disable by adding the configuration setting noted above.
99131

0 commit comments

Comments
 (0)