mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
emit success events on upload resume (#3824)
This commit is contained in:
committed by
Eugenio Romano
parent
ef568679d5
commit
580cd3440f
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { FileModel, UploadService } from '@alfresco/adf-core';
|
||||
import { EventEmitter } from '@angular/core';
|
||||
|
||||
export class UploadFilesEvent {
|
||||
|
||||
private isDefaultPrevented: boolean = false;
|
||||
|
||||
get defaultPrevented() {
|
||||
@@ -29,8 +29,11 @@ export class UploadFilesEvent {
|
||||
this.isDefaultPrevented = true;
|
||||
}
|
||||
|
||||
constructor(public files: Array<FileModel>, private uploadService: UploadService) {
|
||||
}
|
||||
constructor(
|
||||
public files: Array<FileModel>,
|
||||
private uploadService: UploadService,
|
||||
private callback: EventEmitter<any>
|
||||
) {}
|
||||
|
||||
pauseUpload() {
|
||||
this.preventDefault();
|
||||
@@ -39,7 +42,7 @@ export class UploadFilesEvent {
|
||||
resumeUpload() {
|
||||
if (this.files && this.files.length > 0) {
|
||||
this.uploadService.addToQueue(...this.files);
|
||||
this.uploadService.uploadFilesInTheQueue();
|
||||
this.uploadService.uploadFilesInTheQueue(this.callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user