# HG changeset patch # User Nicholas Jillings # Date 1433240663 -3600 # Node ID 7a7a72880996ca8e7edb9d575a6aef34949b955d # Parent 95ff666edb665577b887f15e95654ce2bbd1bab3 Merge from the default branch diff -r 95ff666edb66 -r 7a7a72880996 core.js --- a/core.js Mon Jun 01 15:26:58 2015 +0100 +++ b/core.js Tue Jun 02 11:24:23 2015 +0100 @@ -378,10 +378,13 @@ console.log('Error saving file to server! Presenting download locally'); createProjectSave(null); }; + xmlhttp.onreadystatechange = function() { + console.log(xmlhttp.status); + if (xmlhttp.status != 200 && xmlhttp.readyState == 4) { + createProjectSave(null); + } + }; xmlhttp.send(file); - if (xmlhttp.status == 404) { - createProjectSave(null); - } } return submitDiv; }