Meteor-CollectionFS icon indicating copy to clipboard operation
Meteor-CollectionFS copied to clipboard

Uncaught TypeError: Expecting a function in instanceof check, but got [object Object] cfs_file.js:61

Open chongwang87 opened this issue 9 years ago • 3 comments

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

chongwang87 avatar Feb 25 '16 03:02 chongwang87

same

raylenmargono avatar Apr 11 '16 17:04 raylenmargono

@chongwang87 have you figured out a work around to the issue?

raylenmargono avatar Apr 12 '16 19:04 raylenmargono

+1

bmustata avatar Sep 02 '16 08:09 bmustata