0.2.0 • Published 3 years ago
@ngx-lcp/upload-file v0.2.0
@ngx-lcp/upload-file
Simple service to upload file.
Security Notice
This lib is still in development.
Install
npm i @ngx-lcp/upload-file
Usage
import { NgxUploadFileService, UploadFile, UploadFileError } from '@ngx-lcp/ngx-upload-file';
...
constructor(private uploadFileService: NgxUploadFileService) {}
uploadFile(): void {
this.uploadFileService.open().subscribe(
(data: UploadFile) => {
console.log(data.files);
},
(error: UploadFileError) => {
console.error(error.message);
}
);
}