Skip to content

Commit

Permalink
fix on click function when in plain upload mode (#5876)
Browse files Browse the repository at this point in the history
  • Loading branch information
ursedaniel committed Jul 16, 2020
1 parent dace956 commit e293aa0
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ export class UploadButtonComponent extends UploadBase implements OnInit, OnChang
}

onClickUploadButton(): void {
const files: File[] = [this.file];

if (this.hasAllowableOperations) {
this.uploadFiles(files);
} else {
this.permissionEvent.emit(new PermissionModel({ type: 'content', action: 'upload', permission: 'create' }));
if (this.file) {
const files: File[] = [this.file];

if (this.hasAllowableOperations) {
this.uploadFiles(files);
} else {
this.permissionEvent.emit(new PermissionModel({ type: 'content', action: 'upload', permission: 'create' }));
}
}
}

Expand Down

0 comments on commit e293aa0

Please sign in to comment.