Liking cljdoc? Tell your friends :D

compojure.api.upload


ByteArrayUploadclj

Schema for file param created by ring.middleware.multipart-params.byte-array store.

Schema for file param created by ring.middleware.multipart-params.byte-array store.
sourceraw docstring

TempFileUploadclj

Schema for file param created by ring.middleware.multipart-params.temp-file store.

Schema for file param created by ring.middleware.multipart-params.temp-file store.
sourceraw docstring

wrap-multipart-paramsclj

(wrap-multipart-params handler)
(wrap-multipart-params handler options)

Middleware to parse multipart parameters from a request. Adds the following keys to the request map:

:multipart-params - a map of multipart parameters :params - a merged map of all types of parameter

The following options are accepted

:encoding - character encoding to use for multipart parsing. Overrides the encoding specified in the request. If not specified, uses the encoding specified in a part named "charset", or the content type for each part, or request character encoding if the part has no encoding, or "UTF-8" if no request character encoding is set.

:fallback-encoding - specifies the character encoding used in parsing if a part of the request does not specify encoding in its content type or no part named "charset" is present. Has no effect if :encoding is also set.

: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.

:progress-fn - a function that gets called during uploads. The function should expect four parameters: request, bytes-read, content-length, and item-count.

Middleware to parse multipart parameters from a request. Adds the
following keys to the request map:

:multipart-params - a map of multipart parameters
:params           - a merged map of all types of parameter

The following options are accepted

:encoding          - character encoding to use for multipart parsing.
                     Overrides the encoding specified in the request. If not
                     specified, uses the encoding specified in a part named
                     "_charset_", or the content type for each part, or
                     request character encoding if the part has no encoding,
                     or "UTF-8" if no request character encoding is set.

:fallback-encoding - specifies the character encoding used in parsing if a
                     part of the request does not specify encoding in its
                     content type or no part named "_charset_" is present.
                     Has no effect if :encoding is also set.

: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.

:progress-fn       - a function that gets called during uploads. The
                     function should expect four parameters: request,
                     bytes-read, content-length, and item-count.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close