Error while uploading file to the mongodb

How to fix this error ?

Can you send the screenshot of your express code? The route from where you are sending the data.

sir, it’s giving reference error

In your pup routes, you are not sending any files object. So, while binding you are getting, ‘files not defined’ error.
Define your files object and get it from the request body or query.