Welcome! Please see the About page for a little more info on how this works.

0 votes
in Libs by

when i try to use wrap-multipart-params,what i want is to upload file from form,and i need to save upload file into a designational directory.
however there is no more information in the API DOC,there isn't any example for the :store option
http://ring-clojure.github.io/ring/ring.middleware.multipart-params.html#var-wrap-multipart-params

1 Answer

0 votes
by

Here is the function it uses for :store by default:
https://github.com/ring-clojure/ring/blob/95e4ca25d5b98c45f927b32b5c3c85c21c999d96/ring-core/src/ring/middleware/multipart_params/temp_file.clj#L46-L72

Perhaps that gives you a good starting point for implementing your own.

The docs you linked in this case are actually quite good, they explain what the function needs to be pretty well.

Hope that helps.

...