Addressed comments to use some URL helpers

This commit is contained in:
William Saulnier 2017-07-06 18:30:30 -07:00
parent 8f9a01059a
commit 77229dbd1a

View file

@ -94,8 +94,10 @@ public override UploadResult Upload(Stream stream, string fileName)
string urlForCopy = url;
if (!string.IsNullOrEmpty(AzureStorageCustomDomain))
{
urlForCopy = $"http://{AzureStorageCustomDomain}/{AzureStorageContainer}/{fileName}";
// Azure Blob Storage does not support https with custom domains at this time
urlForCopy = URLHelpers.ForcePrefix(URLHelpers.CombineURL($"{AzureStorageCustomDomain}", $"{AzureStorageContainer}/{fileName}"), "http://");
}
string contentType = Helpers.GetMimeType(fileName);
NameValueCollection requestHeaders = new NameValueCollection();