# HG changeset patch # User Nicholas Jillings # Date 1432714220 -3600 # Node ID 4e121743328956e8ef82e10e1a489b61d7be393b # Parent 0c66c0bf2f69590719677bdab11b655782c4619a Session save to server falback to browser download if the server didn't save the file. diff -r 0c66c0bf2f69 -r 4e1217433289 core.js --- a/core.js Tue May 26 18:47:59 2015 +0100 +++ b/core.js Wed May 27 09:10:20 2015 +0100 @@ -291,6 +291,10 @@ var xmlhttp = new XMLHttpRequest; xmlhttp.open("POST",destURL,true); xmlhttp.setRequestHeader('Content-Type', 'text/xml'); + xmlhttp.onerror = function(){ + console.log('Error saving file to server! Presenting download locally'); + createProjectSave(null); + }; xmlhttp.send(file); } return submitDiv;