Created
March 4, 2016 10:56
-
-
Save bahulneel/87ed9a13eeada08e93e7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defn wrap-save-content [handler content-type] | |
(fn [request] | |
(if (= content-type (get-in request [:headers "Content-Type"])) | |
(let [temp-file (clojure.java.io/file ...)] | |
(copy (:body request) temp-file) | |
(handler (assoc request :body temp-file))) | |
(handler request)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment