my mutler-gridfs-storage is not working properly,it shows cannot read properties of undefined in the console f._id
To succesfuly upload an Image to my Database (MongoDb) I see this cannot set properties of undefined Error
my mutler-gridfs-storage is not working properly,it shows cannot read properties of undefined in the console f._id
To succesfuly upload an Image to my Database (MongoDb) I see this cannot set properties of undefined Error
Ensure that the file is being properly passed to the storage. If it's undefined, you might be facing issues in the upload process itself, which could be due to misconfiguration in the Multer or GridFS setup.
Ensure that you are awaiting this correctly:
const file = await getFileFromGridFS(fileId);
if (file) {
console.log(file._id);
} else {
console.error('File not found');
}