mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-02 19:01:30 +08:00
feat(share): allow serving raw file via query parameter (closes #1182)
This commit is contained in:
parent
4b597c5d2c
commit
6e17346768
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user