This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-04
Channels
- # aleph (3)
- # beginners (37)
- # boot (45)
- # carry (1)
- # cljsrn (15)
- # clojure (78)
- # clojure-austin (2)
- # clojure-brasil (10)
- # clojure-czech (3)
- # clojure-dev (12)
- # clojure-dusseldorf (31)
- # clojure-hamburg (2)
- # clojure-italy (4)
- # clojure-poland (2)
- # clojure-russia (37)
- # clojure-spec (25)
- # clojure-uk (30)
- # clojurescript (160)
- # cursive (40)
- # data-science (1)
- # datomic (31)
- # emacs (7)
- # figwheel (4)
- # hoplon (73)
- # leiningen (1)
- # liberator (5)
- # luminus (7)
- # numerical-computing (1)
- # off-topic (31)
- # om (89)
- # onyx (66)
- # proton (5)
- # protorepl (1)
- # re-frame (18)
- # reagent (2)
- # ring (2)
- # spacemacs (1)
- # untangled (93)
- # vim (19)
- # yada (67)
Hello, could someone give me an example, how I could serve images with liberator? In my case I want to build an string from db entries which results in an image location. This imagefile should be returned as file response.
@danielgrosse they key is that return a status code that redirects, i.e. 303 or 307. In the decision that triggers this status code set the context key :location
to the URL you want to redirect to.
For the resource that serves the actual image you need to specify the correct available content-types, e.g. image/png
and the handler, say, :handle-ok
can return a java.io.File
or a byte stream.
Thank you for the answer.
feel free to ask when you’re stuck somehow. May I ask why you want to do the redirect?