comparison core.js @ 1629:21381e163787

Session save to server falback to browser download if the server didn't save the file.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Wed, 27 May 2015 09:10:20 +0100
parents 244ca9c8546d
children c35bd010cebb
comparison
equal deleted inserted replaced
1628:244ca9c8546d 1629:21381e163787
289 popup.popupContent.appendChild(submitDiv) 289 popup.popupContent.appendChild(submitDiv)
290 } else { 290 } else {
291 var xmlhttp = new XMLHttpRequest; 291 var xmlhttp = new XMLHttpRequest;
292 xmlhttp.open("POST",destURL,true); 292 xmlhttp.open("POST",destURL,true);
293 xmlhttp.setRequestHeader('Content-Type', 'text/xml'); 293 xmlhttp.setRequestHeader('Content-Type', 'text/xml');
294 xmlhttp.onerror = function(){
295 console.log('Error saving file to server! Presenting download locally');
296 createProjectSave(null);
297 };
294 xmlhttp.send(file); 298 xmlhttp.send(file);
295 } 299 }
296 return submitDiv; 300 return submitDiv;
297 } 301 }
298 302