Questions tagged [gridfs-stream]

gridfs-stream is a node.js module that provides streams for writing to and reading from GridFS on MongoDB.

For more information, visit gridfs-stream's github repository.

160 questions
2
votes
1 answer

Manipulate GridFS file with GraphicsMagick and store it as new file

I'm trying to read a GridFS file via gridfs-stream (https://github.com/aheckmann/gridfs-stream), rotate it 90° with gm and store it as a new GridFS file. My result looks very 'unstylish'... So I'm asking for help to optimize this little code…
user3142695
  • 15,844
  • 47
  • 176
  • 332
2
votes
1 answer

Mongoose gridfs-stream how to populate fs.file collection

I'm using gridfs-stream module in nodejs for storing images. var db = require('config/db'); var Schema = require('mongoose').Schema; var schema = new Schema({ name: String, photo: Schema.Types.ObjectId // store file ObjectId }); var model…
Egiw
  • 66
  • 6
2
votes
1 answer

Using gridFS to store files(images) in mongoDB

I'm writing this web-page in angularJS where I want people to edit and store text and images. I've created a file uploading function that let's you upload files from the users computer. The problem is getting this file stored into mongoDB. I've read…
Torby
  • 144
  • 1
  • 13
2
votes
1 answer

Streaming files directly into GridFS with Node.js, Express.js and gridfs-stream

I am using latest version of express, mongodb, nodejs etc. I am not using body parsing middleware as I DONT want to store files on disk when I upload them. I just want to stream them directly into GridFs. I am using the gridfs-stream npm module. I…
user2081478
  • 23
  • 1
  • 3
2
votes
0 answers

Node.js file upload to Gridfs - Error: Request aborted

i have a problem with large file upload to Gridfs via gridfs-stream node module. I have tried to upload smaller files and it's working nicely but when i try to upload larger file (~2gb and more) the node.js server is giving me this error: Error:…
Case09
  • 313
  • 6
  • 18
2
votes
1 answer

Custom field in GridFS

its possible save custom field in GridFS, im using NodeJS and gridfs-stream module. The file is saved as next schema: { _id: "5208b9929e462bc24b000001", filename: "algo.txt", contentType: "binary/octet-stream", length: 133074, chunkSize:…
user1710825
  • 578
  • 5
  • 15
1
vote
0 answers

trying to get uploads saving in MongoDB

I currently have the following code, which saves the temp file to public/files I have tried to understand the MongoDB GridFS documentation but with no success. I am wondering how do I get the files to save inside MongoDB GridFS instead of my…
Russell Harrower
  • 778
  • 1
  • 6
  • 20
1
vote
0 answers

Unable to Stream MP4 Video to Mobile IOS Safari With GridFS-Stream

I can't seem to get my basic mp4 video streaming server to work on mobile IOS Safari/Chrome. It works fine on desktop chrome, but only shows the video player and controls with a black screen on IOS Safari. I found some information talking about…
twominds
  • 1,084
  • 5
  • 20
1
vote
0 answers

openDownloadStream(files[0].metadata).pipe(res) is returning FileNot found error in mongodb gridfs

This is my route file where I stream the image data to the browser. router.get('/image/:id', auth, (req, res) => { const metadata = req.params.id; gfs.find({ metadata: metadata }).toArray((err, files) => { if (!files || files.length === 0) return…
KiZaru
  • 57
  • 1
  • 7
1
vote
1 answer

MongoDB Gridfs-stream is Only Deleting the File but Not the Chunk

I am trying to delete a file and chunk from my MongoDB database but my route only deletes the file but not the chunk. I've seen a few StackOverflow solutions to this issue but they are either now outdated or are based on the deprecated remove()…
twominds
  • 1,084
  • 5
  • 20
1
vote
0 answers

multer-gridfs-storage not processing image properly

Below is the code for a route that is intended to upload pictures in my express app. I was using multer to simply store it in the app inside a uploads folder but now am trying to upload them to MongoDb. I have tried to do this a couple of ways now…
1
vote
1 answer

TypeError: grid.mongo.GridStore is not a constructor when I try to read stream with Grid

I'm using GridFsStorage with multer. This is my code that outputs a TypeError. const mongoURI=DB const conn = mongoose.createConnection(mongoURI); let gfs; conn.once('open', function() { //STREAM INITIALIZING gfs=GridFSBucket(conn.db,…
1
vote
1 answer

TypeError: grid.mongo.GridStore is not a constructor

I'm trying to use gridfs-stream to retrieve images I uploaded using multer. The following code is responding with TypeError: grid.mongo.GridStore is not a constructor at new GridReadStream Someone in this thread suggests that using a different…
1
vote
0 answers

how to fix Error with Nodejs and 'gridfs-stream'

I am trying to follow along a tutorial and use nodejs with 'gridfs-stream' along with a react front end. The tutorial is from last year in 2020. Here is my code. const express = require('express'); const bodyParser = require('body-parser'); const…
Sandy
  • 127
  • 1
  • 12
1
vote
1 answer

Creating query to get some certain parts from a file GRIDFS

In my Spring Boot application I used GridFS to store large file in my database. To find certain files, I use normal queries on the files collection: GridFSFile file = gridFsTemplate.findOne(Query.query(Criteria.where(ID).is(id))); but with this…
Yozmo
  • 521
  • 2
  • 10
1 2
3
10 11