mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fix export attachments (not tested)
This commit is contained in:
parent
4156073b1a
commit
921460db40
1 changed files with 4 additions and 4 deletions
|
|
@ -146,7 +146,7 @@ export class Exporter {
|
||||||
`tmpexport${process.pid}${Math.random()}`,
|
`tmpexport${process.pid}${Math.random()}`,
|
||||||
);
|
);
|
||||||
const tmpWriteable = fs.createWriteStream(tmpFile);
|
const tmpWriteable = fs.createWriteStream(tmpFile);
|
||||||
const readStream = doc.createReadStream();
|
const readStream = fs.createReadStream(doc.path);
|
||||||
readStream.on('data', function(chunk) {
|
readStream.on('data', function(chunk) {
|
||||||
buffer = Buffer.concat([buffer, chunk]);
|
buffer = Buffer.concat([buffer, chunk]);
|
||||||
});
|
});
|
||||||
|
|
@ -173,11 +173,11 @@ export class Exporter {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_id: attachment._id,
|
_id: attachment._id,
|
||||||
cardId: attachment.cardId,
|
cardId: attachment.meta.cardId,
|
||||||
//url: FlowRouter.url(attachment.url()),
|
//url: FlowRouter.url(attachment.url()),
|
||||||
file: filebase64,
|
file: filebase64,
|
||||||
name: attachment.original.name,
|
name: attachment.name,
|
||||||
type: attachment.original.type,
|
type: attachment.type,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue