MongoDB error while uploading images #urgent

System Information
  • Strapi Version: 3.6.0
  • Operating System: windows 10
  • Database: MongoDB
  • Node Version: v14.16.0
  • NPM Version: 6.14.11
  • Yarn Version: 1.22.10

Whenever I am trying to add an image, I am getting an error like this:

     CastError: Cast to ObjectId failed for value "[object Object]" at path "_id" for model "file"
        at model.Query.exec (C:\Users\harsh\Documents\programming\dein-strapi\node_modules\mongoose\lib\query.js:4371:21)
        at model.Query.Query.then (C:\Users\harsh\Documents\programming\dein-strapi\node_modules\mongoose\lib\query.js:4463:15)
        at processTicksAndRejections (internal/process/task_queues.js:93:5)