Save csv files locally and online simultaneously

Hello everyone,

We are using Pavlovia to run experiments on tablets/phones in schools. We are able to test 15+ persons at the same time, which is great.

In our setup, we pre-load all experiment sessions on the tablets/phones and then give them to the participants. The main issue is that - in this specific kind of non-laboratory setup - we sometimes encounter technical issues that make us lose the internet connection during the task (i.e., wifi disconnection). We experienced several participants who were able to do the task BUT at the end of the experiment, the data upload failed, and their data seemed to be forever lost.

My question is: is it possible to save simultaneously locally AND online? Alternatively, how can I make sure that the data is saved locally if the upload fails?

Best regards,