perf: Read attachment buffers only when neccessary, closes #3849

This commit is contained in:
Tom Moor
2022-07-24 19:15:34 +01:00
parent 71da57773e
commit 5e852170f9
3 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ export default class ImportMarkdownZipTask extends ImportTask {
name: child.name,
path: child.path,
mimeType: mime.lookup(child.path) || "application/octet-stream",
buffer: await zipObject.async("nodebuffer"),
buffer: () => zipObject.async("nodebuffer"),
});
return;
}