0
I have an image upload form, but I also want to pass a text field next to the image, the api is working perfectly and when I send by Insomnia it creates everything right in the bank, but when making the requests in the frontend it only sends the image.
example of the service I am using
importarArquivo(file:File, links: string ): Observable<HttpEvent<any>> {
// instanciando formData para utilizar no req
const formData: FormData = new FormData();
formData.append('imagens', file);
formData.append('links', links);
const req = new HttpRequest('POST',`${environment.apiUrl}/banners`, formData );
return this.http.request(req);
}