Banner.jpg Boy_And_Gift.png …
FileStream fs = new FileStream("mov1.avi",…,…,…); var blob = con.GetBlobReference("mov1.avi"); blob.UploadFromStream(fs); blob.Metadata["VideoName"] = "Wildlife.avi"; blob.Metadata["Category"] = "Travel"; blob.Metadata["DateSubmitted"] = DateTime.Now; blob.SetMetadata(); blob.Properties.ContentType = "video/x-msvideo"; blob.SetProperties();
var azureBlobs = con.ListBlobs(); var listOfBlobs = new List (); foreach (var blobItem in azureBlobs) { var azureBlobRecord = con.GetBlobReference(blobItem.Uri.ToString()); azureBlobRecord.FetchAttributes(); listOfBlobs (new VideoBlobStorage() { FileUri = blobItem.Uri, VideoName = azureBlobRecord.Metadata["VideoName"], Category = azureBlobRecord.Metadata["Category"], DateSubmitted = azureBlobRecord.Metadata["DateSubmitted"] }); }
Managing Blob Storage
azureBlobPermissions = new BlobContainerPermissions(); azureBlobPermissions.PublicAccess = BlobContainerPublicAccessType.Container; cont.SetPermissions(azureBlobPermissions);
SharedAccessPolicy policy = new SharedAccessPolicy(); policy.Permissions = SharedAccessPermissions.Read; policy.SharedAccessStartTime = DateTime.UtcNow.AddMinutes(-10); policy.SharedAccessExpiryTime = DateTime.UtcNow.AddMinutes(60); String signature = blob.GetSharedAccessSignature(policy);
SharedAccessPolicy policy = new SharedAccessPolicy(); policy.Permissions = SharedAccessPermissions.Read; policy.SharedAccessStartTime = DateTime.UtcNow.AddMinutes(-10); policy.SharedAccessExpiryTime = DateTime.UtcNow.AddMinutes(60); String signature = blob.GetSharedAccessSignature(policy); azureBlobPermissions = new BlobContainerPermissions(); azureBlobPermissions.SharedAccessPolicies.Add("policy1“, policy); cont.SetPermissions(azureBlobPermissions);
Azure Storage Explorer
[ServiceContract] public interface IService1 { [OperationContract] [WebGet(UriTemplate = "{Container}")] Stream BlobInfo(string Container); }
SharePoint 2010 Integration
Call to Action For Download Download SharePoint VM 356C C60-D539896C66CE&displaylang=en Download Azure Developer Center Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio (November 2010) c4-9dadaa5ed018&displaylang=en For Reference Channel 9 SharePoint Developer Training Kit Channel 9 Azure Developer Training Kit