xxxxxxxxxx
public getHeaders(): { [key: string]: string } {
if (localStorage.getItem('accessToken') != null) {
return {
Authorization: `Bearer ${localStorage.getItem('accessToken')}`
};
} else {
return {};
}
}
uploadPhoto(val: any): any{
const headers = this.getHeaders();
return this.http.post(this.APIUrl+'photoCont/Files',val, {headers});
}