I have followed this link When i check response in my code
imageUploaded(image:any){
var headers = new Headers();
headers.append('Content-Type','multipart/form-data')
headers.append('Authorization',this.token);
let formData: FormData = new FormData();
formData.append('image', image.file);
this.http.post(this.serverUrl+'photo/upload/user/'+this.userJson.user.public_id,formData, { headers: headers})
.subscribe(
response => {
if(response.json().error_code == 0){
alert('done')
}else{
this.data = {};
}
}
)
}
When I verified my API with live the only differance I found in network is the content type
For working API-----Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryl4oxlVSt9yblG8VC
For me -----Content-Type:multipart/form-data
I am missing the boundary with content type.Can anyone please help me.Thanks.