set-content-type-for-versions

This commit is contained in:
Bryan Thornbury 2016-04-28 16:55:55 -07:00
parent 6cd56257fc
commit 7b4298a95e

View file

@ -58,6 +58,9 @@ namespace Microsoft.DotNet.Cli.Build
{ {
CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob); CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob);
blockBlob.UploadTextAsync(content).Wait(); blockBlob.UploadTextAsync(content).Wait();
blockBlob.Properties.ContentType = "text/plain";
blockBlob.SetPropertiesAsync().Wait();
} }
public void CopyBlob(string sourceBlob, string targetBlob) public void CopyBlob(string sourceBlob, string targetBlob)
@ -83,6 +86,11 @@ namespace Microsoft.DotNet.Cli.Build
blockBlob.Properties.CacheControl = "no-cache"; blockBlob.Properties.CacheControl = "no-cache";
blockBlob.SetPropertiesAsync().Wait(); blockBlob.SetPropertiesAsync().Wait();
} }
else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version")
{
blockBlob.Properties.ContentType = "text/plain";
blockBlob.SetPropertiesAsync().Wait();
}
} }
public IEnumerable<string> ListBlobs(string virtualDirectory) public IEnumerable<string> ListBlobs(string virtualDirectory)