Meteor-CollectionFS
Meteor-CollectionFS copied to clipboard
Uncaught TypeError: Expecting a function in instanceof check, but got [object Object] cfs_file.js:61
having problem for the FS collection implementation
File = new FS.Collection("files", {
stores: [new FS.Store.FileSystem("files", {
path: '~/uploads',
filter: {
allow: {
contentTypes: ['image/*','application/pdf']
}
}
})]
});
'submit form'(evt,tpl){
files = tpl.$('[name="files"]')[0].files;
for (var i = 0, ln = files.length; i < ln; i++) {
console.log(files[i]);
File.insert(files[i], function (err, res) {
console.log(err);
console.log(res);
});
}
})
console.log from files[i]
File {
lastModified: 1278956022000last
ModifiedDate: Tue Jul 13 2010 01:33:42 GMT+0800 (SGT)
name: "1.jpg"
size: 6982921
type: "image/jpeg"
webkitRelativePath: ""
__proto__: File
}
after the console.log
Uncaught TypeError: Expecting a function in instanceof check, but got [object Object] cfs_file.js:61
same
@chongwang87 have you figured out a work around to the issue?
+1