-
-
Notifications
You must be signed in to change notification settings - Fork 169
collection
dr.dimitru edited this page Apr 8, 2016
·
6 revisions
Direct reference to Mongo.Collection
var Images = new Meteor.Files({collectionName: 'Images'});
// Example 1:
Images.collection.find({}).forEach(function (fileRef) {
Images.link(fileRef);
});
// Example: Subscribe:
if (Meteor.isClient) {
Images.collection.subscribe('files.images.all');
}
// Example: Publish:
if (Meteor.isServer) {
Meteor.publish 'files.images.all', function () {
Images.collection.find({});
}
}
Meteor-Files | Support | Try ostr.io |
---|---|---|
If you found this package useful, — star it at GitHub and support our open source contributions with a monthly pledge, or submit a one-time donation via PayPal | Monitoring, Analytics, WebSec, Web-CRON and Pre-rendering for a website |