Skip to content

Instantly share code, notes, and snippets.

The concept still works. I slightly changed copying the file.
(mp/wrap-multipart-params
(POST "/fileupload" {:keys [params]}
(let [{:keys [tempfile filename]} (get params "file")]
(io/copy tempfile (java.io.File. (str root-directory "/" filename))))
(response "OK")))