2022-04-07 10:25:56 +02:00
|
|
|
import Attachments from '/models/attachments';
|
2021-04-06 12:42:15 +02:00
|
|
|
import { ObjectID } from 'bson';
|
|
|
|
|
2022-04-08 00:27:56 +02:00
|
|
|
Meteor.publish('attachmentsList', function(limit) {
|
2023-03-12 18:33:38 +01:00
|
|
|
const ret = ReactiveCache.getAttachments(
|
2021-04-06 12:42:15 +02:00
|
|
|
{},
|
|
|
|
{
|
|
|
|
fields: {
|
|
|
|
_id: 1,
|
2022-04-07 10:25:56 +02:00
|
|
|
name: 1,
|
|
|
|
size: 1,
|
|
|
|
type: 1,
|
|
|
|
meta: 1,
|
2022-04-08 00:27:56 +02:00
|
|
|
path: 1,
|
|
|
|
versions: 1,
|
2021-04-06 12:42:15 +02:00
|
|
|
},
|
|
|
|
sort: {
|
2022-04-07 10:25:56 +02:00
|
|
|
name: 1,
|
2021-04-06 12:42:15 +02:00
|
|
|
},
|
2022-04-08 00:27:56 +02:00
|
|
|
limit: limit,
|
2021-04-06 12:42:15 +02:00
|
|
|
},
|
2023-03-12 18:33:38 +01:00
|
|
|
true,
|
2022-04-07 10:25:56 +02:00
|
|
|
).cursor;
|
|
|
|
return ret;
|
2021-04-06 12:42:15 +02:00
|
|
|
});
|