Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var credentials = new StorageCredentials("deldysoft",
- "YOUR PRIMARY KEY FROM. GET IT FROM THE MANGEMENT PORTAL");
- var client = new CloudBlobClient(new Uri("http://deldysoft.blob.core.windows.net/"), credentials);
- // Retrieve a reference to a container. (You need to create one using the mangement portal, or call container.CreateIfNotExists())
- var container = client.GetContainerReference("deldydk");
- // Retrieve reference to a blob named "myfile.gif".
- var blockBlob = container.GetBlockBlobReference("myfile.gif");
- // Create or overwrite the "myblob" blob with contents from a local file.
- using (var fileStream = System.IO.File.OpenRead(@"C:\\myfile.gif"))
- {
- blockBlob.UploadFromStream(fileStream);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement