mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-924] Upload Component enhancements (#2115)
* changed logic/design * restored dialog component spec * revert changes * update upload dialog documentation * public over private * component close method
This commit is contained in:
committed by
Eugenio Romano
parent
4d0d0b3457
commit
aad7164042
@@ -46,6 +46,7 @@ export class FileModel {
|
||||
status: FileUploadStatus = FileUploadStatus.Pending;
|
||||
progress: FileUploadProgress;
|
||||
options: FileUploadOptions;
|
||||
data: any;
|
||||
|
||||
constructor(file: File, options?: FileUploadOptions) {
|
||||
this.file = file;
|
||||
@@ -53,6 +54,7 @@ export class FileModel {
|
||||
this.id = this.generateId();
|
||||
this.name = file.name;
|
||||
this.size = file.size;
|
||||
this.data = {};
|
||||
|
||||
this.progress = {
|
||||
loaded: 0,
|
||||
|
@@ -227,6 +227,7 @@ export class UploadService {
|
||||
private onUploadComplete(file: FileModel, data: any): void {
|
||||
if (file) {
|
||||
file.status = FileUploadStatus.Complete;
|
||||
file.data = data;
|
||||
this.totalComplete++;
|
||||
|
||||
const promise = this.cache[file.id];
|
||||
|
Reference in New Issue
Block a user