Skip to content

Instantly share code, notes, and snippets.

@laliluna
Created February 7, 2014 21:00
Show Gist options
  • Save laliluna/8871749 to your computer and use it in GitHub Desktop.
Save laliluna/8871749 to your computer and use it in GitHub Desktop.
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")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment