mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
fix setting mime after import + cleanup of old search code
This commit is contained in:
@@ -18,6 +18,7 @@ function updateFile(req) {
|
||||
noteRevisionService.createNoteRevision(note);
|
||||
|
||||
note.mime = file.mimetype.toLowerCase();
|
||||
note.save();
|
||||
|
||||
note.setContent(file.buffer);
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ function getNote(req) {
|
||||
|
||||
const contentMetadata = note.getContentMetadata();
|
||||
|
||||
note.contentLength = contentMetadata.contentLength;
|
||||
|
||||
note.combinedUtcDateModified = note.utcDateModified > contentMetadata.utcDateModified ? note.utcDateModified : contentMetadata.utcDateModified;
|
||||
note.combinedDateModified = note.utcDateModified > contentMetadata.utcDateModified ? note.dateModified : contentMetadata.dateModified;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user