【发布时间】:2014-08-27 02:40:21
【问题描述】:
我是一名 Meteor 开发人员,目前正在研究文件上传的方法,并遇到了 collectionFS。我已经按照示例进行操作,但似乎无法像使用普通集合一样探索集合
定义了一个集合:
var Images = new FS.Collection("images", {
stores: [new FS.Store.FileSystem("images", {path: "~/uploads"})]
});
并发表:
Meteor.publish('images', function() {
return Images.find();
});
试图在控制台或 mongodb 中找到它会出现以下错误
Images.find()
ReferenceError: Images is not defined
images.find()
ReferenceError: images is not defined
正常的 Meteor 集合正在运行。当我用 Meteor.collection 替换 FS.Collection 时,它确实有效
我如何浏览收藏?
提前谢谢你
【问题讨论】:
标签: meteor