2021-12-09 14:24:42 +00:00
|
|
|
import {Component} from '@angular/core';
|
|
|
|
import {MessageService} from 'primeng/api';
|
|
|
|
|
|
|
|
@Component({
|
2021-12-28 10:29:25 +00:00
|
|
|
templateUrl: './file.component.html',
|
2021-12-09 14:24:42 +00:00
|
|
|
providers: [MessageService]
|
|
|
|
})
|
2021-12-28 10:29:25 +00:00
|
|
|
export class FileComponent {
|
2021-12-09 14:24:42 +00:00
|
|
|
|
|
|
|
uploadedFiles: any[] = [];
|
|
|
|
|
|
|
|
constructor(private messageService: MessageService) {}
|
|
|
|
|
|
|
|
onUpload(event) {
|
|
|
|
for (const file of event.files) {
|
|
|
|
this.uploadedFiles.push(file);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.messageService.add({severity: 'info', summary: 'Success', detail: 'File Uploaded'});
|
|
|
|
}
|
|
|
|
}
|