Is possible to upload files even on redirect?


#1

Hi all,
in my app I am starting the upload of files on click on button. The upload is success when I stay on the same page until upload is complete. But Is possible to complete upload if I start it and than go to another page? For now if I go to another page the upload is interrupted.

Thanks


#2

Tell us a bit how the upload works.


#3

In template I have button for calling upload function:

<button (click)="upload()">
                <ion-icon icon-upload></ion-icon>
</button>

In upload() function there are some other stuffs like zipping files and storing them in device, but at the end I call file transfer:

 fileTransfer.upload(filePathToZip, apiUrl, options, true)

If I click on upload button, there is approximately 5-10s delay for zipping, saving and uploading. But if I during this delay click in menu to another page redirect the whole process is cancelled even the upload is not finished (I have to start it again than).

And I want to be able do finish upload even if I redirect during delay to another pageā€¦

Do you have enough informations?