【发布时间】:2015-07-29 10:03:44
【问题描述】:
我正在尝试使用 FS.Collection2 库 https://github.com/CollectionFS/Meteor-CollectionFS 在流星中上传工作图像
我设法上传图片并显示它们,但插入图片后出现以下服务器错误(我只插入,不更新任何内容)
Exception while invoking method '/cfs.images.filerecord/update' Error: Did not check() all arguments during call to '/cfs.images.filerecord/update'
这是我的代码:
插入:
FS.Utility.eachFile(event, function(file) {
Images.insert(file, function (err, fileObj) {
console.log(err);
});
});
收藏:
Images = new FS.Collection("images", {
stores: [new FS.Store.FileSystem("images")]
});
if (Meteor.isServer) {
Images.allow({
insert: function (fileID, doc) {
return true;
},
update: function (fileID, doc) {
return true;
},
remove: function(userId, doc) {
return false;
},
download: function (fileID, doc) {
return true;
}
});
}
FS 包版本:
cfs:filesystem 0.1.1
cfs:standard-packages 0.5.3
谢谢,希望你能指出正确的方向
我添加了错误的屏幕截图。
【问题讨论】:
标签: meteor