I am trying to change some binary data from my uploaded images to base64 so I can use that to display an image.  But the terimal is giving me this error:  TypeError: Cannot read property 'on' of undefined   I don't understand, when I post...
So I have this code:  downloadFile(file_id) {     return new Promise((resolve, reject) => {         var mongoose = require('mongoose');         var Grid = require('gridfs-stream');         var fs = require('fs');          m...
Using gridfs-stream, how do I specify the bucket name when finding and fetching files?  My question is a follow-up to the following question found on stackoverflow at How can I specify a GridFS bucket  The solution there provides an example of how to...
I'm working on a website that stores images in a MongoDB GridFS database and then can display one of the chosen images to the user. The upload part is already working, but I'm having trouble with the download part of the image because wheneve...
so I have connected Gridfs to MongoDB on server.js as shown below       //connect to mongodb       mongoose.connect(db, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true },           function(err){            if(err){...
I have images more than .5 millions and I am using meteor and angular for developing app. I have a doubt to save images on database because it could be slow the speed of project.  1-- where to store images in meteor angular app?  2-- I am using colle...
I need to create copy one of record in my FS.Collection ...  I am able to fetch record by  var oldFile = Attachment.find({ _id : cardId }); var newFile = oldFile.copy();   Above code doesn't work for me  I have following packages installed in my...
I want to add two collections with one action.  First one is file using multer and gridfs-stream and second is just literal with properties based on file. That what I achieved: 1)literal based on file and 2)file uploaded. In 1)(literal) this fileID p...
First and foremost I accept that this issue is not something new for developers and there are thousands of post in Stackoverflow.(Specially this post ) I'm new to web development. When I read those post I don't understand...
So I watched this video: https://youtu.be/EVIGIcm7o2w  And it explained a lot of stuff. But the problem is I already have a project created with Express so my connection is done in app.js like this:  // mongodb connection var mongoose = require('...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.