mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
61f197dd81
@ -57,9 +57,7 @@ class ImageTypeWidget extends TypeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async doRefresh(note) {
|
async doRefresh(note) {
|
||||||
const imageHash = utils.randomString(10);
|
this.$imageView.prop("src", `api/images/${note.noteId}/${note.title}`);
|
||||||
|
|
||||||
this.$imageView.prop("src", `api/images/${note.noteId}/${note.title}?${imageHash}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
copyImageToClipboardEvent({ntxId}) {
|
copyImageToClipboardEvent({ntxId}) {
|
||||||
|
@ -60,6 +60,7 @@ function downloadNoteFile(noteId, res, contentDisposition = true) {
|
|||||||
res.setHeader('Content-Disposition', utils.getContentDisposition(filename));
|
res.setHeader('Content-Disposition', utils.getContentDisposition(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||||
res.setHeader('Content-Type', note.mime);
|
res.setHeader('Content-Type', note.mime);
|
||||||
|
|
||||||
res.send(note.getContent());
|
res.send(note.getContent());
|
||||||
|
@ -20,6 +20,7 @@ function returnImage(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res.set('Content-Type', image.mime);
|
res.set('Content-Type', image.mime);
|
||||||
|
res.set("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||||
|
|
||||||
res.send(image.getContent());
|
res.send(image.getContent());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user