Best way to upload videos / files in .net core

0

I have a project in .Net Core 3.0 with a controller that it receive by client a lot of files(individual files), around 5 files per seconds, every time, every day. Now im using IFormFile, but I have this error many times.

 Generic Exception: Microsoft.AspNetCore.Connections.ConnectionResetException: The client has 
 disconnected   ---> System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. 
 (0x80070001)     --- End of inner exception stack trace ---     at 
 Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOOperation.GetResult(Int16 token)     at 
 Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadBody()     at 
 System.IO.Pipelines.PipeCompletion.ThrowLatchedException()     at 
System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)     at 
System.IO.Pipelines.Pipe.ReadAsync(CancellationToken token)     at 
System.IO.Pipelines.Pipe.DefaultPipeReader.ReadAsync(CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadAsync(Memory`1 memory, CancellationToken 
cancellationToken)     at 
Microsoft.AspNetCore.Server.IIS.Core.HttpRequestStream.ReadAsyncInternal(Memory`1 buffer, 
CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.WebUtilities.BufferedReadStream.EnsureBufferedAsync(Int32 minCount, 
CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 
count, CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ReadAsync(Byte[] buffer, Int32 offset, 
Int32 count, CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions.DrainAsync(Stream stream, ArrayPool`1 
bytePool, Nullable`1 limit, CancellationToken cancellationToken)     at 
Microsoft.AspNetCore.Http.Features.FormFeature.InnerReadFormAsync(CancellationToken 
cancellationToken)     at....

I think that maybe if i use Multipart to upload files it will be better. Can you help me guys? Thanks

c#
multipartform-data

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0