From 6588bc6535a1f522491085f86da8f29dfabd28df Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 15 Jan 2020 18:18:31 +0100 Subject: [PATCH] Fix profilePicture reloading --- src/app/components/profile/profile.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/profile/profile.component.ts b/src/app/components/profile/profile.component.ts index 412b106..cd29dd3 100644 --- a/src/app/components/profile/profile.component.ts +++ b/src/app/components/profile/profile.component.ts @@ -73,8 +73,8 @@ export class ProfileComponent implements OnInit { formData.append('profilePicture', event.target.files[0]); this.http.post('https://greenvironment.net/upload', formData).subscribe( - async (response: Response) => { - this.userProfile.profilePicture = 'https://greenvironment.net/' + (await response.json()).filename; + (response: any) => { + this.userProfile.profilePicture = 'https://greenvironment.net/' + response.filename; }, (error) => console.log(error) );