mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
file revisions preview
This commit is contained in:
@@ -19,7 +19,14 @@ async function getNoteRevisions(req) {
|
||||
async function getNoteRevision(req) {
|
||||
const noteRevision = await repository.getNoteRevision(req.params.noteRevisionId);
|
||||
|
||||
if (noteRevision.type !== 'file') {
|
||||
if (noteRevision.type === 'file') {
|
||||
if (noteRevision.isStringNote()) {
|
||||
await noteRevision.getContent();
|
||||
|
||||
noteRevision.content = noteRevision.content.substr(0, 10000);
|
||||
}
|
||||
}
|
||||
else {
|
||||
await noteRevision.getContent();
|
||||
|
||||
if (noteRevision.content && noteRevision.type === 'image') {
|
||||
|
||||
Reference in New Issue
Block a user