System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNetCore.WebUtilities.BufferedReadStream.EnsureBuffered(Int32 minCount)
at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
at FluentStorage.Blobs.Files.DiskDirectoryBlobStorage.WriteAsync(String fullPath, Stream dataStream, Boolean append, CancellationToken cancellationToken)
Note
I also think this fix is the correct way to handle this. Reading synchronously in a async method does not seem like the right way to do it if async is available, and it is available here.
Fixes
Note
I also think this fix is the correct way to handle this. Reading synchronously in a async method does not seem like the right way to do it if async is available, and it is available here.