I'm using Meteor 1.4.2.3 with React without Blaze, and trying to upload a photo using Meteor-Files, when I call insert from FilesCollection I'm recieving this error:

Check the code:
var upload = Fotos.insert({
file: e.target.files[0],
streams: 'dynamic',
chunkSize: 'dynamic'
}, false);
My Collection:
import {
Meteor
}
from 'meteor/meteor';
import {
FilesCollection
}
from 'meteor/ostrio:files';
SimpleSchema.debug = true;
Fotos = new FilesCollection({
collectionName: 'fotos',
debug: true,
storagePath: "/fotos/uploads",
allowClientCode: true, // Disallow remove files from Client
onBeforeUpload: function(file) {
return true;
},
});
export default Fotos;
Can you close... fixed using #110
Thanks @felipesmendes, I had the same problem, this comment is the answer.
Most helpful comment
Thanks @felipesmendes, I had the same problem, this comment is the answer.