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?