This commit is contained in:
Tom Moor
2023-01-29 06:28:57 -08:00
committed by GitHub
parent f0d9bb4898
commit 85ca25371c
9 changed files with 46 additions and 29 deletions

View File

@@ -55,10 +55,10 @@ export default abstract class ExportDocumentTreeTask extends ExportTask {
await Promise.all(
attachments.map(async (attachment) => {
try {
const img = await getFileByKey(attachment.key);
const stream = getFileByKey(attachment.key);
const dir = path.dirname(pathInZip);
if (img) {
zip.file(path.join(dir, attachment.key), img as Blob, {
if (stream) {
zip.file(path.join(dir, attachment.key), stream, {
createFolders: true,
});
}