This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-18
Channels
- # announcements (31)
- # asami (11)
- # aws (33)
- # babashka (30)
- # beginners (69)
- # calva (1)
- # chlorine-clover (10)
- # cider (3)
- # clj-kondo (24)
- # cljdoc (19)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (104)
- # clojure-australia (4)
- # clojure-dev (29)
- # clojure-europe (202)
- # clojure-germany (36)
- # clojure-nl (6)
- # clojure-poland (3)
- # clojure-serbia (6)
- # clojure-spec (18)
- # clojure-uk (32)
- # clojurescript (36)
- # conjure (1)
- # core-async (6)
- # datomic (15)
- # duct (1)
- # emacs (11)
- # fulcro (24)
- # graalvm (12)
- # jobs (3)
- # juxt (1)
- # kaocha (2)
- # keechma (4)
- # lsp (1)
- # malli (102)
- # meander (17)
- # off-topic (16)
- # pathom (8)
- # re-frame (12)
- # remote-jobs (7)
- # rewrite-clj (72)
- # shadow-cljs (27)
- # sql (26)
- # tools-deps (8)
- # vim (3)
- # xtdb (28)
- # yada (5)
In my rn app, I have making a http-xhrio request in a re-frame event handler that uploads a video to the server like so:
(reg-event-fx
:upload-video
(fn [{:keys [db] :as cofx} [_ video-body navigation]]
{:http-xhrio {:method :post
:progress-handler #(dispatch [:upload-progress %])
:uri (str server-uri "/api/upload-video")
:body video-body
:on-success [:upload-success navigation]
:on-failure [:upload-error navigation]
:format (json-request-format)
:response-format (raw-response-format)}
}))
The problem I’m encountering is that when I close the app (run it in the background), the :upload-error event is being triggered. This means that the upload is terminating when the app is left to be run in the background. However, I want the uploading the continue when the app is running in the background. Are there any libraries to achieve this?also I’m looking for support for both for iOS (preferred) and android