-
-
Save maleghast/001cc2fb4a0396e3708188e1aa2c9cb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(resource | |
{:id ::index | |
:methods | |
{:post | |
{:consumes "application/octet-stream" | |
:consumer (fn [ctx _ body-stream] | |
(let [f (java.io.File/createTempFile "yada" ".tmp" (io/file "/tmp"))] | |
(infof "Saving to file: %s" f) | |
(save-to-file | |
ctx body-stream | |
f))) | |
:response (fn [ctx] (format "Thank you, saved upload content to file: %s\n" (:file ctx)))}}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment