Merge branch 'master' of git://github.com/Ibrahim-Islam/ng2-file-upload into Ibrahim-Islam-master
Conflicts: components/file-upload/file-drop.directive.ts
This commit is contained in:
@@ -6,6 +6,7 @@ import { FileUploader } from './file-uploader.class';
|
|||||||
export class FileDropDirective {
|
export class FileDropDirective {
|
||||||
@Input() public uploader:FileUploader;
|
@Input() public uploader:FileUploader;
|
||||||
@Output() public fileOver:EventEmitter<any> = new EventEmitter();
|
@Output() public fileOver:EventEmitter<any> = new EventEmitter();
|
||||||
|
@Output() public onFileDrop:EventEmitter<File> = new EventEmitter();
|
||||||
|
|
||||||
private element:ElementRef;
|
private element:ElementRef;
|
||||||
public constructor(element:ElementRef) {
|
public constructor(element:ElementRef) {
|
||||||
@@ -32,6 +33,7 @@ export class FileDropDirective {
|
|||||||
this._preventAndStop(event);
|
this._preventAndStop(event);
|
||||||
this.uploader.addToQueue(transfer.files, options, filters);
|
this.uploader.addToQueue(transfer.files, options, filters);
|
||||||
this.fileOver.emit(false);
|
this.fileOver.emit(false);
|
||||||
|
this.onFileDrop.emit(transfer.files[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('dragover', ['$event'])
|
@HostListener('dragover', ['$event'])
|
||||||
|
|||||||
Reference in New Issue
Block a user