attachments.js 423 B

123456789101112131415161718192021222324
  1. import Attachments from '/models/attachments';
  2. import { ObjectID } from 'bson';
  3. Meteor.publish('attachmentsList', function(limit) {
  4. const ret = Attachments.find(
  5. {},
  6. {
  7. fields: {
  8. _id: 1,
  9. name: 1,
  10. size: 1,
  11. type: 1,
  12. meta: 1,
  13. path: 1,
  14. versions: 1,
  15. },
  16. sort: {
  17. name: 1,
  18. },
  19. limit: limit,
  20. },
  21. ).cursor;
  22. return ret;
  23. });