summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index e018b09..8726a76 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -236,10 +236,16 @@ This serves the web-build and API over HTTP."
(websocket-send-text ws
(json-encode `((type . "orgText") (data . ,text))))))
-(defservlet* note/:id text/plain ()
+(defservlet* file/:file text/plain ()
(progn
(insert-file-contents-literally (org-link-decode file))
(httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))
+
+
+(defservlet* img/:file text/plain ()
+ (progn
+ (httpd-send-file t (org-link-decode file))
+(httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))
;(insert "error")
;(httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")