This example shows how to use the backup/restore feature for the Velobox' client database.
(See HTML source for details.)

Backup


Uses a simple button width an onclick="addDate_download()" attribute. For storing, a filename with the current date will be proposed.

javascript example:

function addDate_download() {
const d = new Date();
document.getElementById("startBackup").download = "VeloboxBup_" + (d.getFullYear()*10000 + (d.getMonth()+1)*100 + d.getDate());
}


Restore


Uses a multipart/form-data form with a file input tag. If the Velobox cannot restore the data, the HTTP error "400 Bad Request" will be returned.
Hint: The Velobox is unable to handle multiple parts or a part other than type="file".

Classic form

(May not fit very well in a web application.)

XMLHttpRequest form