예제 #1
0
        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);
        }
예제 #2
0
        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);
        }