This commit is contained in:
zadam
2023-03-16 12:17:55 +01:00
parent eee05a4d01
commit b6efc954bd
19 changed files with 127 additions and 135 deletions

View File

@@ -14,7 +14,7 @@ const treeService = require("../tree");
const yauzl = require("yauzl");
const htmlSanitizer = require('../html_sanitizer');
const becca = require("../../becca/becca");
const BNoteAttachment = require("../../becca/entities/bnote_attachment");
const BAttachment = require("../../becca/entities/battachment");
/**
* @param {TaskContext} taskContext
@@ -379,14 +379,14 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
const noteId = getNoteId(noteMeta, filePath);
if (attachmentMeta) {
const noteAttachment = new BNoteAttachment({
const attachment = new BAttachment({
parentId: noteId,
title: attachmentMeta.title,
role: attachmentMeta.role,
mime: attachmentMeta.mime
});
noteAttachment.setContent(content);
attachment.setContent(content);
return;
}