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
Post a Comment