private static CloudBlockBlob blockBlob(AzureStorageUri asUri) { CloudBlobContainer container = blobClient.GetContainerReference(asUri.Container); CloudBlockBlob blob = container.GetBlockBlobReference(asUri.Path); blob.Properties.ContentType = MimeMapping.GetMimeMapping(asUri.Path); return(blob); }
public static ICloudBlob Read(Uri uri) { AzureStorageUri asUri = new AzureStorageUri(uri); CloudBlockBlob blob = blockBlob(asUri); if (!blob.Exists()) { throw new FileNotFoundException(asUri.Path); } return(blob); }