Created
February 22, 2017 11:29
-
-
Save RickMoynihan/962175ee767ad8def05f34533c70f737 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
(ns ring-file-upload.core | |
(:require [ring.adapter.jetty :as jetty]) | |
(:require [ring.middleware.multipart-params :as mp] | |
[ring.middleware.params :as param])) | |
(defn handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} | |
:body (str "REQ: " (prn-str request))}) | |
(def app (-> handler param/wrap-params mp/wrap-multipart-params)) | |
(comment | |
(defonce s (jetty/run-jetty #'app {:port 54321 | |
:join? false })) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment