This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-05
Channels
- # all-the-channels (1)
- # announcements (3)
- # asami (13)
- # beginners (227)
- # calva (2)
- # chlorine-clover (8)
- # cider (7)
- # clj-kondo (4)
- # cljs-dev (21)
- # cljsrn (8)
- # clojure (64)
- # clojure-europe (39)
- # clojure-france (2)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (20)
- # clojure-uk (8)
- # clojurescript (24)
- # conjure (12)
- # datalog (9)
- # datomic (24)
- # emacs (8)
- # figwheel-main (1)
- # fulcro (15)
- # jobs-discuss (1)
- # malli (5)
- # meander (3)
- # off-topic (26)
- # re-frame (15)
- # reagent (10)
- # reitit (1)
- # reveal (1)
- # sci (15)
- # shadow-cljs (25)
- # spacemacs (7)
- # sql (3)
- # xtdb (1)
Hey all, I'm trying to create a file upload endpoint with tags for the file. In part, it looks like this in retit:
["/upload"
{:post {:summary "upload a file with tags"
:parameters {:multipart {:file multipart/temp-file-part
:tags [string?]}}
...
The generated swagger ui creates the right controls, but the request fails to be coerced correctly. In part, I get the following error (using the tags a, b, c):
"pred": "clojure.core/coll?",
"val": "a&tags=b&tags=c",
Is there a middleware I should be using to parse the request or some other solution? Right now I've got coercion/coerce-request-middleware
in my middlewares list. I suppose I could add a custom middleware to parse the tags value before it hits the coercer or something, but I'm hoping this is a solved problem.