When trying to make a request POST
to the server with angle 4, returns error, I have already tried a million things and nothing, I have investigated and nothing.
this.http.post('localhost:53286/api/Home/Signup', formData, options).suscribe(
res>=>{}
err=>{}
)
That's my method to do the post to the server
let options : RequestOptionsArgs = new RequestOptions();
options.header.append({'Content-Type':'multipart/form-data'});
When making the request, it returns error 500, I've been with this error for days, maybe it affects the way I upload the file and it's this way. having @ViewChild('fileInput') FileInput;
Upload(){
let FileBrowser = this.FileInput.NativeElement;
if(FileBrowser.files && FileBrowser.files[0])
this.signupmodel.CIPath = FileBrowser.files[0];
}
Being the signupmodel.CIPath
where the image address is stored.