When I turn off the internet and turn it back on the upload resumes and the addListener for 'completed' is still running in the background. And the code continues to execute in that listener in the background which I don't want because I have an HOC that refetches my data and gives a chance to upload again, is there any way to remove that addListener? or to cancel the ongoing upload when the internet is turned off. Also can I not just provide null in cancelUpload(null) to cancel all ongoing uploads???
When I turn off the internet and turn it back on the upload resumes and the addListener for 'completed' is still running in the background. And the code continues to execute in that listener in the background which I don't want because I have an HOC that refetches my data and gives a chance to upload again, is there any way to remove that addListener? or to cancel the ongoing upload when the internet is turned off. Also can I not just provide null in cancelUpload(null) to cancel all ongoing uploads???