IONIC: keep uploading the file even on screen change

I am creating a small chat app and i have to give the send file option in chat. It’s working fine when I am uploading the file while chatting but when I close the chat screen it stops the uploading. So is there any way to keep the uploading even on change the screen?

As someone else had made a comment in the slack channel…

A service can handle the upload process between routes.