From 7b4298a95e84f5ed03b0109895f39198e9f992f9 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Thu, 28 Apr 2016 16:55:55 -0700 Subject: [PATCH] set-content-type-for-versions --- scripts/dotnet-cli-build/Publishing/AzurePublisher.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs b/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs index 575e3b22c..281673422 100644 --- a/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs +++ b/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs @@ -58,6 +58,9 @@ namespace Microsoft.DotNet.Cli.Build { CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob); blockBlob.UploadTextAsync(content).Wait(); + + blockBlob.Properties.ContentType = "text/plain"; + blockBlob.SetPropertiesAsync().Wait(); } public void CopyBlob(string sourceBlob, string targetBlob) @@ -83,6 +86,11 @@ namespace Microsoft.DotNet.Cli.Build blockBlob.Properties.CacheControl = "no-cache"; blockBlob.SetPropertiesAsync().Wait(); } + else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version") + { + blockBlob.Properties.ContentType = "text/plain"; + blockBlob.SetPropertiesAsync().Wait(); + } } public IEnumerable ListBlobs(string virtualDirectory)