Cannot POST image to my API Route from React.js

I am creating a MERN app in which I have created an api route /api/books where user can POST a book’s details with it’s image, and the data will be stored in MongoDB. I am using multer and it stores …

Cannot read property ‘path’ of undefined while uploading image upload on the frontend(react)

I am trying to upload an image on the frontend, but this is not working, I am getting the error below message: “Cannot read property ‘path’ of undefined” status: “fail” When I log …

multer npm: TypeError: Cannot read property ‘path’ of undefined

I have a problem uploading an image file to my server, I watched a tutorial on YouTube about multer and I do exactly the same thing that is done in the tutorial and for whatever reason I get an error: …