mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
image import/export related fixes
This commit is contained in:
@@ -26,8 +26,7 @@ async function saveImage(buffer, originalName, parentNoteId, shrinkImageSwitch)
|
||||
|
||||
const parentNote = await repository.getNote(parentNoteId);
|
||||
|
||||
const fileNameWithoutExtension = originalName.replace(/\.[^/.]+$/, "");
|
||||
const fileName = sanitizeFilename(fileNameWithoutExtension + "." + imageFormat.ext);
|
||||
const fileName = sanitizeFilename(originalName);
|
||||
|
||||
const {note} = await noteService.createNote(parentNoteId, fileName, finalImageBuffer, {
|
||||
target: 'into',
|
||||
|
||||
Reference in New Issue
Block a user