https://github.com/erossini/aspnetcoreuploadfiles
Uploading files in ASP.NET core is largely the same as standard full framework MVC, with the large exception being how you can now stream large files. We will go over both methods of uploading a file in ASP.NET core.
https://github.com/erossini/aspnetcoreuploadfiles
Last synced: 2 months ago
JSON representation
Uploading files in ASP.NET core is largely the same as standard full framework MVC, with the large exception being how you can now stream large files. We will go over both methods of uploading a file in ASP.NET core.
- Host: GitHub
- URL: https://github.com/erossini/aspnetcoreuploadfiles
- Owner: erossini
- Created: 2022-01-20T11:05:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-20T12:33:46.000Z (over 3 years ago)
- Last Synced: 2025-04-08T02:42:55.259Z (6 months ago)
- Language: C#
- Size: 148 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ASP.NET Core Upload big files
Uploading files in ASP.NET core is largely the same as standard full framework MVC, with the large exception being how you can now stream large files. We will go over both methods of uploading a file in ASP.NET core.I wrote a post [Uploading files in ASPNET Core](https://www.puresourcecode.com/dotnet/net-core/uploading-files-in-aspnet-core/) on [PureSourceCode](https://www.puresourcecode.com/) to explain in detail the code.
## Implementation for .NET Core 2.x and 3.x
When you run the app, you have the following screen to try different scenarios.
## Implementation for .NET 5.x or above
The first implementation is for uploading large files reasding the content from the `Request`. To use this version, you have to use Postman or CURL.
In the second implementation, the file is passed as `IFormFile`. To upload the file from Swagger, we have to add a proper filter `SwaggerFileOperationFilter`.
