I used app router in nextjs 13 to create my own project, I also used api/route.js feature in nextjs13 to manage my backend. I created an api to store my products information in mongodb. The problem I have is that I want to store the images of my products that are sent from the front end in the products folder in the assets folder. I searched on the internet, but the results that I got are how to upload the file in page router, which is done using multer. I used multer in express to upload the file, but I don't know how to use it in app router. Please guide me, what methods should I use to upload files in app router and how should I do this?
I tried to use multer, but I failed to implement it, because multer is a middleware that is used in Express, but I did not understand how to use it in app router.