This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-30
Channels
- # adventofcode (22)
- # announcements (7)
- # beginners (32)
- # calva (56)
- # cider (96)
- # cljdoc (7)
- # cljs-dev (50)
- # clojure (173)
- # clojure-austin (8)
- # clojure-brasil (7)
- # clojure-europe (10)
- # clojure-greece (2)
- # clojure-italy (10)
- # clojure-nl (9)
- # clojure-spec (18)
- # clojure-uk (143)
- # clojurebridge (3)
- # clojurescript (9)
- # cursive (14)
- # data-science (1)
- # datascript (4)
- # datomic (9)
- # docker (7)
- # emacs (2)
- # figwheel-main (4)
- # fulcro (18)
- # garden (1)
- # graphql (13)
- # hyperfiddle (4)
- # juxt (2)
- # off-topic (43)
- # pathom (1)
- # pedestal (17)
- # portkey (163)
- # re-frame (4)
- # reitit (7)
- # rum (4)
- # shadow-cljs (139)
- # spacemacs (5)
- # sql (14)
- # unrepl (2)
i made a thing, not sure if it goes against some explicit decision in re-frame or not. it allows you to tee an event handler so that you can pipe it to multiple handlers https://github.com/oliyh/alrightee
hi everybody. A problem with file uploading: - I have a form (in my views.cljs) with an input of type "file" - I have an upload button that should dispatch the file uploading event to the server via ajax I have an event on the on-change of the input "file" that fires this:
(rf/reg-event-db
::new-version-store-multipart
(fn [db [_ _]]
(let [input-element (.getElementById js/document "file")
name (.-name input-element)
files (.-files input-element)
form-data (let [f-d (js/FormData. "file-form")]
(doseq [file-key (.keys js/Object files)]
(.append f-d name (aget files file-key)))
f-d)]
(assoc-in db [:document-details :new-version :multipart] form-data))))
But form-data
is always empty.