luminus

zeitue 2020-07-14T03:56:46.039300Z

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.

okwori 2020-07-14T15:30:31.039400Z

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

1❤️
zeitue 2020-07-15T05:37:42.039700Z

thanks

1
okwori 2020-07-14T15:30:31.039400Z

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

1❤️