NuGet Gallery Feed for UploadStreamOptimise multi-part streaming file upload performance, offering 10x improvement in performance, and reduced memory allocation (10%-40%).
By default dotnet model form model binding loads the entire stream into memory using `IFormFile` - this is non-ideal for large files
where processing of the stream should occur during streaming rather then buffering entire file(s) to memory/disk.
This package allows upload streams to be asynchronously processed via a delegate while maintaining generic model binding functionality with `ModelState` validation.https://www.nuget.org/packages/UploadStream/2020-03-05T10:13:32Zhttps://www.nuget.org/packages/UploadStream/3.1.1UploadStream 3.1.12020-03-05T10:10:58Z2020-03-05T10:13:32Zma1fhttps://www.nuget.org/profiles/ma1fOptimise multi-part streaming file upload performance, offering 10x improvement in performance, and reduced memory allocation (10%-40%).
By default dotnet model form model binding loads the entire stream into memory using `IFormFile` - this is non-ideal for large files
where processing of the stream should occur during streaming rather then buffering entire file(s) to memory/disk.
This package allows upload streams to be asynchronously processed via a delegate while maintaining generic model binding functionality with `ModelState` validation.https://www.nuget.org/packages/UploadStream/3.1.0UploadStream 3.1.02020-03-05T10:06:25Z2020-03-05T10:12:06Zma1fhttps://www.nuget.org/profiles/ma1fOptimise multi-part streaming file upload performance, offering 10x improvement in performance, and reduced memory allocation (10%-40%).
By default dotnet model form model binding loads the entire stream into memory using `IEnumerable<IFormFile>` - this is non-ideal for large files
where processing of the stream should occur during streaming rather then buffering entire file(s) to memory/disk.
This package allows upload streams to be asynchronously processed via a delegate (`StreamFiles<T>(Action<IFormFile> func)`,
maintaining generic model binding functionality with `ModelState` validation.
## Usage
```csharp
[HttpPost("upload")]
public async Task<IActionResult> Upload() {
// returns a generic typed model, alternatively non-generic overload if no model binding is required
MyModel model = await this.StreamFiles<MyModel>(async formFile => {
// implement processing of stream as required via an IFormFile interface
using (var stream = formfile.OpenReadStream())
await ...
});
// ModelState is still validated from model
if(!ModelState.IsValid)
...
}
```https://www.nuget.org/packages/UploadStream/2.2.0UploadStream 2.2.02018-12-05T21:59:27Z2020-03-05T10:12:06Zma1fhttps://www.nuget.org/profiles/ma1fPackage Descriptionhttps://www.nuget.org/packages/UploadStream/1.0.1UploadStream 1.0.12018-06-09T22:25:18Z2020-03-05T10:12:06Zma1fhttps://www.nuget.org/profiles/ma1fPackage Descriptionhttps://www.nuget.org/packages/UploadStream/1.0.0UploadStream 1.0.02018-05-29T15:19:40Z2020-03-05T10:12:06Zma1fhttps://www.nuget.org/profiles/ma1fPackage Description