I\'m a beginner with Angular, I want to know how to create Angular 5 File upload part, I\'m trying to find any tutorial or doc, but I don\'t see anything a
Very easy and fastest method is using ng2-file-upload.
Install ng2-file-upload via npm. npm i ng2-file-upload --save
At first import module in your module.
import { FileUploadModule } from 'ng2-file-upload';
Add it to [imports] under @NgModule:
imports: [ ... FileUploadModule, ... ]
Markup:
In your commponent ts:
import { FileUploader } from 'ng2-file-upload';
...
uploader: FileUploader = new FileUploader({ url: "api/your_upload", removeAfterUpload: false, autoUpload: true });
It`is simplest usage of this. To know all power of this see demo