summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorRomulus Urakagi Tsai <urakagi@gmail.com>2019-11-27 09:40:19 +0000
committerRomulus Urakagi Tsai <urakagi@gmail.com>2019-11-27 09:40:19 +0000
commit6cdd464f54fca423876a27ec2a4269ae5841cdb0 (patch)
treef94a55bf42bf63dba054a36b294aa152e9e7a40d /client/lib
parent4dcdec0084414e7dde9e630add01ecd2865bd941 (diff)
downloadwekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.tar.gz
wekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.tar.bz2
wekan-6cdd464f54fca423876a27ec2a4269ae5841cdb0.zip
Uploaded done, but uploading not
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/utils.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js
index d667382d..8503b035 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -32,20 +32,12 @@ Utils = {
}
};
if (!card) {
- return next();
+ return onUploaded();
}
let settings = {
file: fileObj,
streams: 'dynamic',
chunkSize: 'dynamic',
- onUploaded: function(error, fileObj) {
- console.log('after insert', Attachments.find({}).fetch());
- if (error) {
- console.log('Error while upload', error);
- } else {
- next(fileObj);
- }
- },
};
settings.meta = {};
if (card.isLinkedCard()) {
@@ -58,11 +50,7 @@ Utils = {
settings.meta.cardId = card._id;
}
settings.meta.userId = Meteor.userId();
- // FIXME: What is this?
- /* if (file.original) {
- file.original.name = fileObj.name;
- }*/
- Attachments.insert(settings);
+ Attachments.insert(settings).on('end', next);
},
shrinkImage(options) {
// shrink image to certain size