This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-23
Channels
- # babashka (4)
- # beginners (46)
- # biff (64)
- # calva (34)
- # cider (29)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (42)
- # clojure-australia (2)
- # clojure-china (1)
- # clojure-europe (35)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (4)
- # clojurescript (3)
- # core-typed (3)
- # cursive (5)
- # datalevin (3)
- # datomic (23)
- # hyperfiddle (92)
- # joyride (8)
- # juxt (3)
- # malli (1)
- # nbb (44)
- # pathom (10)
- # portal (3)
- # rdf (1)
- # reitit (10)
- # shadow-cljs (60)
- # sql (12)
Anyone using multipart-coercion? I am having a hard time using it.
:post {:handler #(views.products/create-product product-repo file-store %)
:parameters {:multipart ::eprod/create-new-product}}
with
(s/def ::create-new-product (s/keys :req-un [::cultivation-period ::harvest-period
::category ::type ::name ::unit
::image ::processing-time]))
it does not validate anything. I can send anything.I have also had problems with multipart routes https://clojureverse.org/t/submit-clojure-data-to-reitit-multipart-api/9764
👍 2
I've been using kit as a template and it ships with ring-defaults
which enables multipart-params
middleware when setting the multipart config to true. multipart-params
is not sufficient when intending to coerce multipart-forms. I needed to activate https://github.com/metosin/reitit/blob/master/modules/reitit-middleware/src/reitit/ring/middleware/multipart.clj .