Fix profilePicture reloading

master
Max 5 years ago
parent 92c7744599
commit 6588bc6535

@ -73,8 +73,8 @@ export class ProfileComponent implements OnInit {
formData.append('profilePicture', event.target.files[0]); formData.append('profilePicture', event.target.files[0]);
this.http.post('https://greenvironment.net/upload', formData).subscribe( this.http.post('https://greenvironment.net/upload', formData).subscribe(
async (response: Response) => { (response: any) => {
this.userProfile.profilePicture = 'https://greenvironment.net/' + (await response.json()).filename; this.userProfile.profilePicture = 'https://greenvironment.net/' + response.filename;
}, },
(error) => console.log(error) (error) => console.log(error)
); );

Loading…
Cancel
Save