You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runningatlocalhost:8080Error: ThedatabaseconnectionmustbeopentostorefilesatGridFsStorage._handleFile (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/multer-gridfs-storage/lib/gridfs.js:175:12)
at /mnt/ap/ap/node-js-upload-image-mongodb/node_modules/multer/lib/make-middleware.js:145:17atallowAll (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/multer/index.js:8:3)
atwrappedFileFilter (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/multer/index.js:44:7)
atBusboy.<anonymous> (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/multer/lib/make-middleware.js:115:7)
atBusboy.emit (events.js:400:28)
atBusboy.emit (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/busboy/lib/main.js:38:33)
atPartStream.<anonymous> (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/busboy/lib/types/multipart.js:213:13)
atPartStream.emit (events.js:400:28)
atHeaderParser.<anonymous> (/mnt/ap/ap/node-js-upload-image-mongodb/node_modules/dicer/lib/Dicer.js:51:16) {
storageErrors: []
}
{"message":"Error when trying upload many files: Error: The database connection must be open to store files"}
Node.js Upload multiple images to MongoDB example
https://github.com/coding-to-music/node-js-upload-image-mongodb
For more detail, please visit:
https://github.com/bezkoder/node-js-upload-image-mongodb
Front-end Apps to work with this Node.js Server:
Angular 8 Client / Angular 10 Client / Angular 11 Client / Angular 12 Client
Angular Material 12
Vue Client / Vuetify Client
React Client / React Hooks Client
Material UI Client
More Practice:
Associations:
Integration (run back-end & front-end on same server/port)
Project setup
Run
Output
Attempt to connect to the database
Output
Mongod port
Output
Start the mongod database server
mongod
Go to route files
Output
Output
Upload a file
Output
Console Output
The text was updated successfully, but these errors were encountered: