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.
["/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))})}}]
thanks