Fork me on GitHub
#luminus
<
2020-07-14
>
zeitue03:07:46

Does anyone know how to make an endpoint in Luminus that an odt can be downloaded from? I keep getting a corrupted file at the end of it.

okwori15:07:31

["/download/odt"
     {:get {:summary    "downloads an odt file"
            :swagger    {:produces ["application/vnd.oasis.opendocument.text"]}
            :handler    (fn [_]
                          {:status  200
                           :headers {"Content-Type" "application/vnd.oasis.opendocument.text"}
                           :body    (-> "docs/file.odt"
                                        (io/resource)
                                        (io/input-stream))})}}]

❤️ 3