Last active
January 31, 2019 03:33
-
-
Save donma/7cb68cfe76f3f21ccb892352e0b1a945 to your computer and use it in GitHub Desktop.
Azure Blob Storage Create Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connsctionString = "your_connection_string"; | |
var cloudStorage = Microsoft.WindowsAzure.Storage.CloudStorageAccount.Parse(connsctionString); | |
var cloudBlobClient = cloudStorage.CreateCloudBlobClient(); | |
var cloudBlobContainer = cloudBlobClient.GetContainerReference("donmablogsample"); | |
//建立如果不存在的話 | |
var result = cloudBlobContainer.CreateIfNotExistsAsync().Result; | |
//如果已經建立過了,也會回傳 false | |
Console.WriteLine("Create Container donmablogsample result : " + result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment