Menu

Uploading files from Angular 2 and ASP.NET Core Web API – Part 1

Project that I am working on need to upload some files, I have used ng2-file-upload for my client side, and on server side I am using ASP.NET Core Web API. This is the part 1 demonstrating how to upload the file from Angular 2. Please check out part 2 for the ASP.NET Core server side logic.

First install the npm on your angular 2 project

in your app.module.ts file add the reference like below

and import as part of the module imports

component.html html looks like below

component.ts looks like this

Please check out part 2 for the ASP.NET Core server side logic.

Leave a comment