set-content-type-for-versions
This commit is contained in:
parent
6cd56257fc
commit
7b4298a95e
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue