mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
moving out note revision content into separate table, refactoring, WIP
This commit is contained in:
@@ -154,6 +154,14 @@ function getContentDisposition(filename) {
|
||||
return `file; filename="${sanitizedFilename}"; filename*=UTF-8''${sanitizedFilename}`;
|
||||
}
|
||||
|
||||
const STRING_MIME_TYPES = ["application/x-javascript"];
|
||||
|
||||
function isStringNote(type, mime) {
|
||||
return ["text", "code", "relation-map", "search"].includes(type)
|
||||
|| mime.startsWith('text/')
|
||||
|| STRING_MIME_TYPES.includes(mime);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
randomSecureToken,
|
||||
randomString,
|
||||
@@ -177,5 +185,6 @@ module.exports = {
|
||||
escapeRegExp,
|
||||
crash,
|
||||
sanitizeFilenameForHeader,
|
||||
getContentDisposition
|
||||
getContentDisposition,
|
||||
isStringNote
|
||||
};
|
||||
Reference in New Issue
Block a user