mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix error when the dialog is not initialized
This commit is contained in:
@@ -102,7 +102,6 @@ export class UploadButtonComponent {
|
||||
*/
|
||||
onFilesAdded($event: any): void {
|
||||
let files = $event.currentTarget.files;
|
||||
this.printFileInfo(files);
|
||||
this.uploadFiles(this.currentFolderPath, files);
|
||||
// reset the value of the input file
|
||||
$event.target.value = '';
|
||||
@@ -115,7 +114,6 @@ export class UploadButtonComponent {
|
||||
*/
|
||||
onDirectoryAdded($event: any): void {
|
||||
let files = $event.currentTarget.files;
|
||||
this.printFileInfo(files);
|
||||
let hashMapDir = this.convertIntoHashMap(files);
|
||||
|
||||
hashMapDir.forEach((filesDir, directoryPath) => {
|
||||
@@ -265,18 +263,6 @@ export class UploadButtonComponent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the basic information of a file
|
||||
* @param files
|
||||
*/
|
||||
printFileInfo(files: any) {
|
||||
for (let file of files) {
|
||||
console.log('Name: ' + file.name);
|
||||
console.log('Size: ' + file.size);
|
||||
console.log('Path: ' + file.webkitRelativePath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a placeholder {0} in a message with the input keys
|
||||
* @param message - the message that conains the placeholder
|
||||
|
Reference in New Issue
Block a user