I was searching for a solution in the past day about this but never found a solution...
I am sending multiple images from angular using from data and if i check the network for the api call the files are sended but when i check the parameters on the api method it shows count=0
Angular Code
createProduct(product: any, images: File[]) {
// return this.http.post(this.createProductUrl, product).pipe(
// switchMap((resp: Product) => {
const colorId = '2';
const productId = '3';
const image = new FormData();
for (let index = 0; index < images.length; index++) {
image.append('files', images[index]);
}
return this.http.post(`${this.createImagesForProduct}/${productId}/color/${colorId}`, image)
.pipe(map(
resp => {
return console.log(resp);
}
));
please i need your help
Request.Form.Filesempty as well?Request.Form.Filesand its working but is there a way that i can achive that using fromform?