spoonconsulting / cordova-plugin-background-upload

Cordova plugin for background upload
Apache License 2.0
49 stars 53 forks source link

Is there a way to get the list of pending upload tasks? #250

Open deadshot2491 opened 1 year ago

deadshot2491 commented 1 year ago

Thanks for the plugin first of all!

I have one need which seems to be a simple one. I was thinking there will be a function to get the pending tasks currently, but it doesnt seem to exist and we just have to wait for the notification once we trigger an upload. Can we have a function or property exposed in js part to get the list of pending tasks (+failed ones also will be great!)?

I can make contribution on iOS side but I havnt gone through the implementation of native iOS code yet to see how feasible it is.. please suggest or advise here..

zfir commented 1 year ago

Hello @deadshot2491,

There is no function that is available now to get the list of pending uploads. To be able to do that I think we should save all the uploads in sqlite and also save the state of each upload.

Thanks for the suggestion, we will try to look into if we have time. But if you want to help, a PR will be most welcome.

ombr commented 1 year ago

I think you will have to store the list of upload in your side. We are trying to keep the plugin as simple as possible and thus you should manage the uploads on your side.