Attachment upload from card done, need to fix download link

This commit is contained in:
Romulus Urakagi Tsai 2019-11-20 10:40:09 +00:00
parent 05c53ca01d
commit 4dcdec0084
9 changed files with 49 additions and 27 deletions

View file

@ -4,7 +4,7 @@ Attachments = new FilesCollection({
storagePath: storagePath(),
debug: true, // FIXME: Remove debug mode
collectionName: 'attachments2',
allowClientCode: false, // Disallow remove files from Client
allowClientCode: true, // FIXME: Permissions
});
if (Meteor.isServer) {
@ -15,11 +15,11 @@ if (Meteor.isServer) {
// TODO: Permission related
// TODO: Add Activity update
// TODO: publish and subscribe
// Meteor.publish('files.attachments.all', function () {
// return Attachments.find().cursor;
// });
Meteor.publish('attachments', function() {
return Attachments.find().cursor;
});
} else {
// Meteor.subscribe('files.attachments.all');
Meteor.subscribe('attachments');
}
// ---------- Deprecated fallback ---------- //