wekan/server/publications/attachments.js

26 lines
445 B
JavaScript
Raw Normal View History

import Attachments from '/models/attachments';
import { ObjectID } from 'bson';
2022-04-08 00:27:56 +02:00
Meteor.publish('attachmentsList', function(limit) {
const ret = ReactiveCache.getAttachments(
{},
{
fields: {
_id: 1,
name: 1,
size: 1,
type: 1,
meta: 1,
2022-04-08 00:27:56 +02:00
path: 1,
versions: 1,
},
sort: {
name: 1,
},
2022-04-08 00:27:56 +02:00
limit: limit,
},
true,
).cursor;
return ret;
});