Skip to content

Commit

Permalink
make file serving toggleable
Browse files Browse the repository at this point in the history
  • Loading branch information
goktug97 committed Aug 22, 2020
1 parent 5ea3d14 commit 832ba1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions org-roam-server.el
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,11 @@ DESCRIPTION is the shown attribute to the user."
(if org-roam-server-authenticate
(if (not (string= org-roam-server-token token))
(httpd-error httpd-current-proc 403)))
(set-buffer-multibyte nil)
(insert-file-contents-literally ,(elt file 2))))
(if org-roam-server-serve-files
(progn
(set-buffer-multibyte nil)
(insert-file-contents-literally ,(elt file 2)))
(httpd-error httpd-current-proc 403))))

(defun org-roam-server-export-file-id (link description format)
"Append token to the file links.
Expand Down

0 comments on commit 832ba1a

Please sign in to comment.