This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-19
Channels
- # aws-lambda (1)
- # beginners (35)
- # cider (7)
- # cljsjs (2)
- # clojure (48)
- # clojure-austria (1)
- # clojure-conj (9)
- # clojure-dev (8)
- # clojure-india (6)
- # clojure-italy (12)
- # clojure-nl (8)
- # clojure-norway (3)
- # clojure-spec (9)
- # clojure-uk (92)
- # clojurescript (103)
- # community-development (7)
- # cursive (15)
- # datomic (75)
- # devcards (3)
- # emacs (3)
- # events (1)
- # fulcro (129)
- # hoplon (4)
- # immutant (2)
- # jobs (10)
- # leiningen (9)
- # off-topic (4)
- # onyx (2)
- # re-frame (45)
- # reagent (39)
- # reitit (40)
- # remote-jobs (4)
- # ring (2)
- # ring-swagger (9)
- # shadow-cljs (17)
- # tools-deps (31)
How to correctly return a file for download in Ring? I am returning this response however the file in there is a mess (but it's not empty either)
{:status 200
:headers {"Content-Type" "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"Content-Disposition" "attachment; filename=listing_offer.xlsx"}
:body (io/input-stream "/tmp/sheet.xlsx")
File in the /tmp is ok and can be opened normally. Thanks for advice!@petr.mensik Have you tried using http://ring-clojure.github.io/ring/ring.util.response.html#var-file-response instead of constructing the response yourself?