added contentLength to note entity

This commit is contained in:
zadam
2019-11-09 09:36:08 +01:00
parent 5aa5ec3af1
commit 7c7beb5502
19 changed files with 94 additions and 73 deletions

View File

@@ -139,12 +139,6 @@ async function importEnex(taskContext, file, parentNote) {
text = text.replace(/\s/g, '');
resource.content = utils.fromBase64(text);
resource.attributes.push({
type: 'label',
name: 'fileSize',
value: resource.content.length
});
}
else if (currentTag === 'mime') {
resource.mime = text.toLowerCase();

View File

@@ -48,10 +48,7 @@ async function importFile(taskContext, file, parentNote) {
isProtected: parentNote.isProtected && protectedSessionService.isProtectedSessionAvailable(),
type: 'file',
mime: mimeService.getMime(originalName) || file.mimetype,
attributes: [
{ type: "label", name: "originalFileName", value: originalName },
{ type: "label", name: "fileSize", value: size }
]
attributes: [{ type: "label", name: "originalFileName", value: originalName }]
});
taskContext.increaseProgressCount();

View File

@@ -352,13 +352,6 @@ async function importTar(taskContext, fileBuffer, importRootNote) {
name: 'originalFileName',
value: path.basename(filePath)
});
attributes.push({
noteId,
type: 'label',
name: 'fileSize',
value: content.byteLength
});
}
}