我需要一些meteor-files包的帮助 我正在跟踪最简单的下载DEMO https://github.com/VeliovGroup/Meteor-Files/tree/master/demo-simplest-download-button并获得一些保险杠。首先是代码:
this.Books = new Meteor.Files({
debug: true,
collectionName: 'Books'
});
// To have sample file in DB we will upload it on server startup:
if (Meteor.isServer) {
Books.denyClient();
Books.collection.attachSchema(Books.schema);
Meteor.startup(function () {
if (true) {
Books.load('http://localhost:3000/file.pdf', {
fileName: 'file.pdf',
meta: {}
});
}
});
Meteor.publish('Books', function () {
return Books.find().cursor;
});
} else {
Meteor.subscribe('Books');
}
(!Images.find()。COUNT())
哪个流星不能识别为一个功能并在那里打破。我修正了它,只需将其替换为TRUE就像你在代码中看到的那样
问题是现在一切都运行了,我的文件被成功导入但我可以在服务器日志中看到他无法找到导致的文件:
[FilesCollection] [load]收到:http://localhost:3000/file.pdf I20160806-14:00:27.190(2)? [FilesCollection] [load] [insert] file.pdf - >图书 I20160806-14:00:29.360(2)? [FilesCollection] [find(undefined)] I20160806-14:00:33.045(2)? [FilesCollection] [find(undefined)]
答案 0 :(得分:0)
包裹已过期,需要我身边的流星更新。如果有人需要