hi
i use angular 4 an .net core, in angular i have this:
files: FormData = new FormData();
.
.
for (let file of event.files) {
this.files.append("files", file, file.FileName);
}
.
.
postImages:void{
this.http.post(this.baseUrl + "/api/services/app/MyService/PostFiles", this.files).subscribe(result => {
});
}
and in .net core web api:
public async Task PostFiles(IFormFile[] files)
{
..
}
when i post my request to .net core web api i get bad request error!
in single file post everything work well , in .net core web api i have this:
public async Task PostFiles(IFormFile file)
hi i use angular 4 an .net core, in angular i have this: files: FormData = new FormData(); . . for (let file of event.files) { this.files.append("files", file, file.FileName); } . . postImages:void{ this.http.post(this.baseUrl + "/api/services/app/MyService/PostFiles", this.files).subscribe(result => { }); }
and in .net core web api: public async Task PostFiles(IFormFile[] files)
{
..
}
when i post my request to .net core web api i get bad request error!
in single file post everything work well , in .net core web api i have this: public async Task PostFiles(IFormFile file)