@ -39,6 +39,7 @@ export class DialogFileUploadComponent {
* Fired when the ok button was pressed
*/
onOkClicked() {
if (this.file) {
this.errorOccurred = false;
this.uploading = true;
this.selfService.changeProfilePicture(this.file).subscribe((response) => {
@ -60,6 +61,10 @@ export class DialogFileUploadComponent {
this.errorMessage = 'Failed to upload the profile picture.';
}
});
} else {
this.errorOccurred = true;
this.errorMessage = 'Please select a file to upload.';
/**