Skip to content

Commit 6e1b812

Browse files
committed
refactor: use shared access signature
1 parent 921bc16 commit 6e1b812

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Umbraco.Cloud.StorageProviders.AzureBlob/AzureBlobComposer.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ public void Compose(IUmbracoBuilder builder)
1919
builder.AddAzureBlobMediaFileSystem();
2020

2121
var configuration = new ConfigurationBuilder()
22-
.AddJsonFile("umbraco-cloud.json", true, true)
23-
.AddEnvironmentVariables("UMBRACO:CLOUD:")
22+
.AddEnvironmentVariables("Umbraco:Cloud:")
2423
.Build();
2524

2625
builder.Services.Configure<AzureBlobFileSystemOptions>(AzureBlobFileSystemOptions.MediaFileSystemName,
27-
configuration.GetSection("Storage:AzureBlob").Bind);
26+
options =>
27+
{
28+
var section = configuration.GetSection("Storage:AzureBlob");
29+
30+
options.ConnectionString = $"BlobEndpoint={section["Endpoint"]};SharedAccessSignature={section["SharedAccessSignature"]}";
31+
options.ContainerName = section["ContainerName"];
32+
});
2833

2934
builder.Services.Configure<UmbracoPipelineOptions>(options =>
3035
{

0 commit comments

Comments
 (0)