Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'origin/develop' into feature/typescript_backend

Elian Doran5e5add7e4785
diff --cc src/becca/entities/battachment.ts
index 7d90921ab7,faeb131e75..44935ee04c
--- a/src/becca/entities/battachment.ts
+++ b/src/becca/entities/battachment.ts
@@@ -1,29 -1,17 +1,30 @@@
"use strict";
-const utils = require('../../services/utils.js');
-const dateUtils = require('../../services/date_utils.js');
-const AbstractBeccaEntity = require('./abstract_becca_entity.js');
-const sql = require('../../services/sql.js');
-const protectedSessionService = require('../../services/protected_session.js');
-const log = require('../../services/log.js');
+import utils = require('../../services/utils');
+import dateUtils = require('../../services/date_utils');
+import AbstractBeccaEntity = require('./abstract_becca_entity');
+import sql = require('../../services/sql');
+import protectedSessionService = require('../../services/protected_session');
+import log = require('../../services/log');
+import { AttachmentRow } from './rows';
+import BNote = require('./bnote');
+import BBranch = require('./bbranch');
const attachmentRoleToNoteTypeMapping = {
- 'image': 'image'
+ 'image': 'image',
+ 'file': 'file'
};
+interface ContentOpts {
+ // TODO: Found in bnote.ts, to check if it's actually used and not a typo.
+ forceSave?: boolean;
+
+ /** will also save this BAttachment entity */
+ forceFullSave?: boolean;
+ /** override frontend heuristics on when to reload, instruct to reload */
+ forceFrontendReload?: boolean;
+}
+
/**
* Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
* larger amounts of data and generally not accessible to the user.