diff --git a/README.md b/README.md index b8233fe8..f6606913 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ export interface UploadFile { export interface UploadOutput { type: 'addedToQueue' | 'allAddedToQueue' | 'uploading' | 'done' | 'removed' | 'start' | 'cancelled' | 'dragOver' | 'dragOut' | 'drop'; file?: UploadFile; + nativeFile?: File; // native javascript File object, can be used to process uploaded files in other libraries } // input events that user can emit to ngx-uploader diff --git a/src/ngx-uploader/classes/ngx-uploader.class.ts b/src/ngx-uploader/classes/ngx-uploader.class.ts index 3c022dd3..00691f02 100644 --- a/src/ngx-uploader/classes/ngx-uploader.class.ts +++ b/src/ngx-uploader/classes/ngx-uploader.class.ts @@ -37,6 +37,7 @@ export interface UploadFile { export interface UploadOutput { type: 'addedToQueue' | 'allAddedToQueue' | 'uploading' | 'done' | 'removed' | 'start' | 'cancelled' | 'dragOver' | 'dragOut' | 'drop'; file?: UploadFile; + nativeFile?: File; } export interface UploadInput { @@ -100,7 +101,7 @@ export class NgUploaderService { lastModifiedDate: file.lastModifiedDate }; - this.serviceEvents.emit({ type: 'addedToQueue', file: uploadFile }); + this.serviceEvents.emit({ type: 'addedToQueue', file: uploadFile, nativeFile: file }); return uploadFile; }));