Questions tagged [multer-gridfs-storage]

Storage engine for Multer to store uploaded files in the request directly to MongoDb using GridFs.

GridFS storage engine for Multer to store uploaded files directly to MongoDb.

With this module you can stream files that were parsed by multer on multipart/form-data requests and automatically pipe those streams to your database.

97 questions
6
votes
3 answers

"TypeError: GridFsStorage is not a constructor"

for some reason I keep getting a "TypeError: GridFsStorage is not a constructor" error. I have no idea why its giving me this error since I'm just following the official documentation. Storage and upload conn.once('open', ()=> { gfs =…
5
votes
1 answer

Multer GridFsStorage Dynamic Configuration for Multiple MongoDB Connections

So I'm using MongoDB Atlas, Mongoose, Multer and GridFsStorage to upload files to a single database on the cloud which works fine, but I want to be able to upload files to different databases, using different database connections dynamically. In…
Nikitas IO
  • 696
  • 5
  • 20
4
votes
5 answers

Error: grid.mongo.GridStore is not a consstructor ,Using mongoose, Grid-fs-stream and grid multer storage

I am getting the following error mentioned. The basic configs are as follow: I have uploaded the files on the server I want to download them but getting these errors I called a POST request to /api/files/delete/${fileId} Which should call the route…
Anand
  • 75
  • 1
  • 8
3
votes
0 answers

Stream MongoDB Grid-FS File As Input For fluent-ffmpeg Transcode Process

I am trying to compress/transcode a video file that is saved in my MongoDB database, but I am not sure how I can add it as an input stream into the ffmpeg transcoding process. Any ideas? async function transcodeVideo(_id) { …
3
votes
1 answer

Cannot update db with multer and mongose

I am using mongoose with node.js to find a document and update its properties but everytime i do so there is some sort of error which is not logging into the console.It is some issue with multer. Can anyone guess what am id doing wrong? My…
Saswat
  • 180
  • 4
  • 13
3
votes
1 answer

Throwing and handling error from multer-gridfs-storage

I am throwing an error from multer-gridfs-storage , but not sure about handling it in a better way . My Code :- const storage = new gridfsStorage({ url : 'mongodb://localhost:27017/uploadeditems' , options : { useNewUrlParser : true ,…
2
votes
0 answers

React Native Image Upload to Node Js Mongodb server

Helllo, I am building an app in react-native which submits some images while signing up for the user. The backend is in node js MongoDB and the images are uploaded in MongoDB database handled by gridfs multer storage. The image is captured from…
2
votes
1 answer

Should I use GridFS or some other method to create a file sharing app?

I am currently beginning work on a file sharing app for my company. A simple form to upload a file, the user is then given a download URL and can past that on to anyone so they can download the file (Similar to products such as WeTransfer). However…
2
votes
0 answers

Stuck the the error : Typeerror : grid.mongo.objectID is not a constructor

I was trying to upload images to mongodb database. And Then got this error which I am not able to resolve. Can someone help! The code after all the require statements is show below // MONGOOSE CONNECTION const conn =…
2
votes
3 answers

TypeError: mongodb_1.ObjectID is not a constructor with GridFsStorage

I'm new to nodejs along with mongoDB, can anyone please help me to solve this issue. i used to multer, multer-gridfs-storage, gridfs-stream for uploading file and images. But i'm getting this TypeError: mongodb_1.ObjectID is not a constructor in…
shanthi B
  • 73
  • 2
  • 7
2
votes
1 answer

How to implement a resume pause functionality for file upload ? I am using node js, gridfs and multer

I have used the following link to upload files in mongodb which is working in my application : https://dev.to/shubhambattoo/uploading-files-to-mongodb-with-gridfs-and-multer-using-nodejs-5aed But I need to implement resume and pause functionality…
Sharon
  • 59
  • 6
2
votes
1 answer

Multer GridFs Storage Associate req.user to metadata

I can upload a file to my MongoDB using multer-gridfs-storage, but I am having trouble associating the file with user, what i want is to be able to pass req.user which i get from passportjs to the file metadata // Create mongo connection const conn…
2
votes
2 answers

Cancel File Upload: Multer, MongoDB

I can't seem to find any up-to-date answers on how to cancel a file upload using Mongo, NodeJS & Angular. I've only come across some tuttorials on how to delete a file but that is NOT what I am looking for. I want to be able to cancel the file…
2
votes
0 answers

how to upload products form and images to MongoDB atlas server?

I build a e-commerce website and i use fetch function to fetch the product data to the back end. like so const form = document.querySelector('form'); form.addEventListener('submit', async(e) => { e.preventDefault(); // get data from infront…
2
votes
1 answer

Deprecation errors in mongoDB, where should I pass the parameters?

I'm using mongoDB to store 2 files, and I get those messages: DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to…
Alexander
  • 1,288
  • 5
  • 19
  • 38
1
2 3 4 5 6 7