Relative Content

Tag Archive for reactjsnode.jsaxiosbackendmulter

Formdata inside an array

Hello i’ve been working in a blog to post blogs, you can add images too
For add image system i use Multer and Path.
To save the image, I save it in a FormData, with its key, so Multer can read the FormData key when making the POST request
But here is the problem. When i post a blog, i add the name, the post body, and the image saved in a formdata, everything saved in an array that is later sent to the backend with axios
So the formdata is saved into a array of objects
My question is how Multer, can read the formdata stored in the array
Here is the code i use for image and post