uploading new image revisions, WIP

This commit is contained in:
zadam
2019-11-08 22:34:30 +01:00
parent 3149dff880
commit 712f67e983
22 changed files with 736 additions and 217 deletions

View File

@@ -255,7 +255,7 @@ async function importEnex(taskContext, file, parentNote) {
try {
const originalName = "image." + resource.mime.substr(6);
const {url} = await imageService.saveImage(resource.content, originalName, noteEntity.noteId, taskContext.data.shrinkImages);
const {url} = await imageService.saveImage(noteEntity.noteId, resource.content, originalName, taskContext.data.shrinkImages);
const imageLink = `<img src="${url}">`;

View File

@@ -32,7 +32,7 @@ async function importSingleFile(taskContext, file, parentNote) {
}
async function importImage(file, parentNote, taskContext) {
const {note} = await imageService.saveImage(file.buffer, file.originalname, parentNote.noteId, taskContext.data.shrinkImages);
const {note} = await imageService.saveImage(parentNote.noteId, file.buffer, file.originalname, taskContext.data.shrinkImages);
taskContext.increaseProgressCount();