Fork me on GitHub
#ring
<
2018-06-19
>
petr.mensik16:06:02

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!