Fork me on GitHub
#cljsrn
<
2021-03-08
>
zendevil14:03:51

@joshmiller I got it working. Thanks

zendevil14:03:10

I have a reframe handler like so:

(reg-event-fx
 :upload-video
 (fn [{:keys [db] :as cofx} [_ navigation]]
   {:video->body [(:video-body db) (:video db)]
    :thumbnail->body [(:video-body db) (:thumbnail db)]
    :title->body [(:video-body db) (:title db)]
    :address->body [(:video-body db) (:address db)]
    :date->body [(:video-body db) (:date db)]
    :db (assoc db :uploading-progress true
               :upload-error false)
    :http-xhrio {:method :post
                 :progress-handler #(dispatch [:upload-progress %])
                 :uri (str server-uri "/api/upload-video")
                 :body (:video-body db)
                 :on-success [:upload-success navigation]
                 :on-failure [:upload-error navigation]
                 :format (json-request-format)
                 :response-format (raw-response-format)}
    }))
but I inexplicably started getting the following error upon dispatching this event: