Permalink
Browse files

Improved multipart :store option documentation

  • Loading branch information...
1 parent 192862d commit 33ecea264987b2486ff0c0949db7d22dd5a9f0b5 @weavejester weavejester committed Feb 26, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 ring-core/src/ring/middleware/multipart_params.clj
View
11 ring-core/src/ring/middleware/multipart_params.clj
@@ -71,11 +71,18 @@
following keys to the request map:
:multipart-params - a map of multipart parameters
:params - a merged map of all types of parameter
- Takes an optional configuration map. Recognized keys are:
+
+ This middleware takes an optional configuration map. Recognized keys are:
+
:encoding - character encoding to use for multipart parsing. If not
specified, uses the request character encoding, or \"UTF-8\"
if no request character encoding is set.
- :store - a function that stores a file upload. xxxx"
+
+ :store - a function that stores a file upload. The function should
+ expect a map with :filename, content-type and :stream keys,
+ and its return value will be used as the value for the
+ parameter in the multipart parameter map. The default storage
+ function is the temp-file-store."
[handler & [opts]]
(fn [request]
(let [encoding (or (:encoding opts)

0 comments on commit 33ecea2

Please sign in to comment.