summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorRomulus Urakagi Tsai <urakagi@gmail.com>2020-05-22 14:59:56 +0800
committerRomulus Urakagi Tsai <urakagi@gmail.com>2020-05-22 14:59:56 +0800
commit921460db4031134db863e32101c0ad60a17416b5 (patch)
treeb3b02617d26a2e4325a5908bbdc19a158e3b6897 /models
parent4156073b1a5d18ec70a00571ffccdd504b99098a (diff)
downloadwekan-921460db4031134db863e32101c0ad60a17416b5.tar.gz
wekan-921460db4031134db863e32101c0ad60a17416b5.tar.bz2
wekan-921460db4031134db863e32101c0ad60a17416b5.zip
Fix export attachments (not tested)
Diffstat (limited to 'models')
-rw-r--r--models/export.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/export.js b/models/export.js
index 35e55804..1eb47e54 100644
--- a/models/export.js
+++ b/models/export.js
@@ -146,7 +146,7 @@ export class Exporter {
`tmpexport${process.pid}${Math.random()}`,
);
const tmpWriteable = fs.createWriteStream(tmpFile);
- const readStream = doc.createReadStream();
+ const readStream = fs.createReadStream(doc.path);
readStream.on('data', function(chunk) {
buffer = Buffer.concat([buffer, chunk]);
});
@@ -173,11 +173,11 @@ export class Exporter {
return {
_id: attachment._id,
- cardId: attachment.cardId,
+ cardId: attachment.meta.cardId,
//url: FlowRouter.url(attachment.url()),
file: filebase64,
- name: attachment.original.name,
- type: attachment.original.type,
+ name: attachment.name,
+ type: attachment.type,
};
});