|
|
@ -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)
|
|
|
|
);
|
|
|
|
);
|
|
|
|