diff options
author | Pjotr Prins | 2023-08-28 14:51:43 +0200 |
---|---|---|
committer | Pjotr Prins | 2023-08-28 14:51:43 +0200 |
commit | 0f50763c9eef214bc301b7af57e0a59f8d0b761f (patch) | |
tree | 7556080dd26b6d333328a46d704951222dcfc145 /web/webserver.scm | |
parent | 89801fbdb731ab64d49dd92fe5ad3ac2ee647e4d (diff) | |
download | gn-guile-0f50763c9eef214bc301b7af57e0a59f8d0b761f.tar.gz |
Serve images
Diffstat (limited to 'web/webserver.scm')
-rwxr-xr-x | web/webserver.scm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/web/webserver.scm b/web/webserver.scm index d697735..2c9fd53 100755 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -96,8 +96,7 @@ otherwise search for set/group data" (list `((content-type . ,(assoc-ref file-mime-types (file-extension file-name))) (last-modified . ,(time-utc->date modified))) - - (call-with-input-file "./static/images/CMOR.jpg" get-bytevector-all)))) + (call-with-input-file file-name get-bytevector-all)))) (define* (render-doc path page #:optional rec #:key (extra-headers '())) (list (append extra-headers @@ -129,8 +128,8 @@ otherwise search for set/group data" (render-json info)) (('GET "version") (render-json get-version)) - (('GET "static" "images" path) - (render-static-image path)) + (('GET "static" "images" fn) + (render-static-image (string-append "static/images/" fn))) (('GET "brand" path) (render-brand path)) (('GET "doc" "species.html") |