forked from cadence/breezewiki
idfk
This commit is contained in:
parent
1c676fd5a0
commit
f6b448ae8f
1 changed files with 6 additions and 6 deletions
|
@ -32,15 +32,15 @@
|
||||||
(log-outgoing image-url)
|
(log-outgoing image-url)
|
||||||
(define dest-res (easy:head image-url #:timeouts timeouts))
|
(define dest-res (easy:head image-url #:timeouts timeouts))
|
||||||
(define content-type (easy:response-headers-ref dest-res 'Content-Type))
|
(define content-type (easy:response-headers-ref dest-res 'Content-Type))
|
||||||
`(cond
|
(cond
|
||||||
[(eq? content-type #f) ""]
|
[(eq? content-type #f) `""]
|
||||||
[(regexp-match? #rx"^image/" content-type)
|
[(regexp-match? #rx"^image/" content-type)
|
||||||
'(img (@ (src ,(u-proxy-url image-url))))]
|
`(img (@ (src ,(u-proxy-url image-url))))]
|
||||||
[(regexp-match? #rx"^audio/" content-type)
|
[(regexp-match? #rx"^audio/" content-type)
|
||||||
'(audio (@ (src ,(u-proxy-url image-url)) (controls)))]
|
`(audio (@ (src ,(u-proxy-url image-url)) (controls)))]
|
||||||
[(regexp-match? #rx"^video/" content-type)
|
[(regexp-match? #rx"^video/" content-type)
|
||||||
'(video (@ (src ,(u-proxy-url image-url)) (controls)))]
|
`(video (@ (src ,(u-proxy-url image-url)) (controls)))]
|
||||||
[else ""]))
|
[else `""]))
|
||||||
|
|
||||||
(define (generate-results-page
|
(define (generate-results-page
|
||||||
#:source-url source-url
|
#:source-url source-url
|
||||||
|
|
Loading…
Reference in a new issue