-
-
Notifications
You must be signed in to change notification settings - Fork 168
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) {
Meteor.subscribe('files.images.all');
}
// Example: Publish:
if (Meteor.isServer) {
Meteor.publish('files.images.all', function () {
return 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 |
|