Reputation: 31
I am trying to use a NG Model form to upload data to my backend. It works as expected until I try to use an input type file. My goal with this input file type is to upload an image to a Cloudinary storage in my backend. I have read that for an input type file it is better to use (change), so this is what I have done.
<input class="form-control" type="file" (change)="getPokemonImage($event)" #fileUpload >
The issue I am currently having with the above is the data displays in my frontend console logs, but it does not return in my backend.
I have made a stackblitz of my code. If anyone could help me configure my data to the backend and succesfully upload to my database/cloudinary storage, I'd be so appreciative! I am very confused on the multer/cloudinar setup in the backend.
MyApp: https://stackblitz.com/~/github.com/ChiomaGrace/AngularApp
Upvotes: 1
Views: 119