mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
switchable image shrinking
This commit is contained in:
@@ -233,7 +233,7 @@ async function importEnex(importContext, file, parentNote) {
|
||||
resource.mime = fileTypeFromBuffer.mime;
|
||||
}
|
||||
|
||||
const createResourceNote = async () => {
|
||||
const createFileNote = async () => {
|
||||
const resourceNote = (await noteService.createNote(noteEntity.noteId, resource.title, resource.content, {
|
||||
attributes: resource.attributes,
|
||||
type: 'file',
|
||||
@@ -264,10 +264,10 @@ async function importEnex(importContext, file, parentNote) {
|
||||
}
|
||||
} catch (e) {
|
||||
log.error("error when saving image from ENEX file: " + e);
|
||||
await createResourceNote();
|
||||
await createFileNote();
|
||||
}
|
||||
} else {
|
||||
await createResourceNote();
|
||||
await createFileNote();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ const ImportContext = require('../import_context');
|
||||
* @return {Promise<*>}
|
||||
*/
|
||||
async function importTar(importContext, fileBuffer, importRootNote) {
|
||||
importContext = importContext || new ImportContext("1", false);
|
||||
|
||||
// maps from original noteId (in tar file) to newly generated noteId
|
||||
const noteIdMap = {};
|
||||
const attributes = [];
|
||||
|
||||
Reference in New Issue
Block a user