unified file and image upload WIP

This commit is contained in:
zadam
2023-06-15 01:26:38 +02:00
parent 75c6afd1c3
commit 3ff5fe61b2
8 changed files with 22 additions and 36 deletions

View File

@@ -162,10 +162,7 @@ function saveImageToAttachment(noteId, uploadBuffer, originalName, shrinkImageSw
});
});
return {
attachment,
url: `api/attachments/${attachment.attachmentId}/image/${encodeURIComponent(fileName)}`
};
return attachment;
}
async function shrinkImage(buffer, originalName) {