#46 Upload files in a folder

This commit is contained in:
mauriziovitale84
2016-05-12 12:55:35 +01:00
parent 4898a2e63e
commit 3c2167273f
17 changed files with 85 additions and 27 deletions

View File

@@ -16,7 +16,7 @@
*/
import {Component, ViewChild, ElementRef, Input} from 'angular2/core';
import {Component, ViewChild, ElementRef, Input, EventEmitter} from 'angular2/core';
import {UploadService} from '../services/upload.service';
import {FileModel} from '../models/file.model';
import {FileUploadingDialogComponent} from './file-uploading-dialog.component';
@@ -53,6 +53,9 @@ export class UploadDragAreaComponent {
filesUploadingList: FileModel [] = [];
@Input()
uploaddirectory: string = '';
constructor(public el: ElementRef) {
console.log('UploadComponent constructor', el);
@@ -77,6 +80,7 @@ export class UploadDragAreaComponent {
onFilesDropped(files): void {
if (files.length) {
this._uploaderService.addToQueue(files);
this._uploaderService.uploadFilesInTheQueue(this.uploaddirectory);
this.filesUploadingList = this._uploaderService.getQueue();
if (this.showUploadDialog) {
this._showDialog();