Skip to content

Commit

Permalink
Support Azurite Blob Storage for devolpment (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjuarezgx authored Jun 19, 2024
1 parent 3495b86 commit 2ee12bd
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ private void Initialize()
string publicContainer = GetEncryptedPropertyValue(PUBLIC_CONTAINER);
string privateContainer = GetEncryptedPropertyValue(PRIVATE_CONTAINER);


string useDevelopmentStorage = Environment.GetEnvironmentVariable("AzuriteUseDevelopmentStorage");
CloudStorageAccount storageAccount;

if (string.Equals(useDevelopmentStorage, "true", StringComparison.OrdinalIgnoreCase))
storageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true");
else {
StorageCredentials credentials = new StorageCredentials(Account, Key);
CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, true);
storageAccount = new CloudStorageAccount(credentials, true);
}

Client = storageAccount.CreateCloudBlobClient();

Expand Down

0 comments on commit 2ee12bd

Please sign in to comment.