Fix refresh token mecanism.
This commit is contained in:
1 parent
b091dc52b7
commit
ca6b207816
5 files changed
+18
-12
No files matched your search
+13
-2
@@ -53,7 +53,18 @@ export class PictureSelectionDialog implements OnInit {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
uploadPicture(file: any): void {
|
||||
console.log("uploadFile", file);
|
||||
uploadPicture(fileSelectionEvent: any): void {
|
||||
const pictureFile = fileSelectionEvent.target.files[0];
|
||||
if (pictureFile) {
|
||||
this.pictureRestService.uploadPicture(pictureFile)
|
||||
.then(pictureId => {
|
||||
this.dialogRef.close(pictureId);
|
||||
})
|
||||
.catch(error => {
|
||||
const errorMessage = 'A technical error occured while uploading your picture.';
|
||||
console.error(errorMessage, error);
|
||||
this.snackBar.open(errorMessage, 'Close', { duration: 5000 });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user