From d4e73d2a87d4484576358020ae21c5a5f0aa11ad Mon Sep 17 00:00:00 2001 From: Ayman El-Ghoneimy <4632474+aelghoneimy@users.noreply.github.com> Date: Fri, 6 Aug 2021 19:38:06 +0100 Subject: [PATCH] Update AzureFileSystem.cs When trying to upload a file 14MB+ is taking a lot of time to upload. Using the async variant fixes the issue. --- src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs b/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs index c837618..d6fbe0d 100644 --- a/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs +++ b/src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs @@ -293,7 +293,7 @@ public void AddFile(string path, Stream stream, bool overrideIfExists) } } - blockBlob.UploadFromStream(stream); + blockBlob.UploadFromStreamAsync(stream).ConfigureAwait(false).GetAwaiter().GetResult(); string contentType = this.MimeTypeResolver.Resolve(path);