diff options
author | Romulus Urakagi Tsai <urakagi@gmail.com> | 2019-11-27 09:40:19 +0000 |
---|---|---|
committer | Romulus Urakagi Tsai <urakagi@gmail.com> | 2019-11-27 09:40:19 +0000 |
commit | 6cdd464f54fca423876a27ec2a4269ae5841cdb0 (patch) | |
tree | f94a55bf42bf63dba054a36b294aa152e9e7a40d /models/attachments.js | |
parent | 4dcdec0084414e7dde9e630add01ecd2865bd941 (diff) | |
download | wekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.tar.gz wekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.tar.bz2 wekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.zip |
Uploaded done, but uploading not
Diffstat (limited to 'models/attachments.js')
-rw-r--r-- | models/attachments.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/attachments.js b/models/attachments.js index 4537e47c..5dcc75e6 100644 --- a/models/attachments.js +++ b/models/attachments.js @@ -2,9 +2,12 @@ import { FilesCollection } from 'meteor/ostrio:files'; Attachments = new FilesCollection({ storagePath: storagePath(), - debug: true, // FIXME: Remove debug mode + debug: false, // FIXME: Remove debug mode collectionName: 'attachments2', allowClientCode: true, // FIXME: Permissions + onAfterUpload: (fileRef) => { + Attachments.update({_id:fileRef._id}, {$set: {"meta.uploaded": true}}); + } }); if (Meteor.isServer) { @@ -15,6 +18,7 @@ if (Meteor.isServer) { // TODO: Permission related // TODO: Add Activity update // TODO: publish and subscribe + Meteor.publish('attachments', function() { return Attachments.find().cursor; }); |