cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
zendevil 2021-03-18T17:33:23.003400Z

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?

zendevil 2021-03-18T17:41:27.004Z

also I’m looking for support for both for iOS (preferred) and android