Skip to content

Instantly share code, notes, and snippets.

@RickMoynihan
Created February 22, 2017 11:29
Show Gist options
  • Save RickMoynihan/962175ee767ad8def05f34533c70f737 to your computer and use it in GitHub Desktop.
Save RickMoynihan/962175ee767ad8def05f34533c70f737 to your computer and use it in GitHub Desktop.
(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