attachments.js 445 B

12345678910111213141516171819202122232425
  1. import Attachments from '/models/attachments';
  2. import { ObjectID } from 'bson';
  3. Meteor.publish('attachmentsList', function(limit) {
  4. const ret = ReactiveCache.getAttachments(
  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. true,
  22. ).cursor;
  23. return ret;
  24. });