mongodb - Inserting file into mongo DB using Meteor -


i want insert imges mongo db using meteor frame work . have written code create file object .

'change .inputfile': function(event, template) { fs.utility.eachfile(event,function(file){ var file=fs.file(file) alert("file :"+file) }) 

when tried create file object showing error:

typeerror: self.attachdata not function. 

look @ line:

var file = fs.file(file) 

this can't work. in moment define file new var file in right-hand-side undefined. try this:

'change .inputfile': function(event, template) {   fs.utility.eachfile(event,function(file){     var fileobj = fs.file(file)     alert("file :", fileobj)   }) }) 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -