Skip to content

Build your personal knowledge base with Trilium Notes

feat(share): allow serving raw file via query parameter (closes #1182)

Elian Doran6e173467686c
diff --git a/src/share/routes.ts b/src/share/routes.ts
index fedec7abbd..c77a41fc03 100644
--- a/src/share/routes.ts
+++ b/src/share/routes.ts
@@ -143,7 +143,7 @@ function register(router: Router) {
addNoIndexHeader(note, res);
- if (note.isLabelTruthy("shareRaw")) {
+ if (note.isLabelTruthy("shareRaw") || typeof req.query.raw !== "undefined") {
res.setHeader("Content-Type", note.mime).send(note.getContent());
return;