@@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__)
FETCH_SIZE = 1000
-DOWNLOAD_COOKIE_AGE = 10
+DOWNLOAD_COOKIE_AGE = 1800 # 30 minutes
def download(handle, format, db, id=None, file_name='query_result'):
@@ -62,10 +62,14 @@ JSON.bigdataParse = (function () {
// Get the next character. When there are no more characters,
// return the empty string.
-
- ch = text.charAt(at);
- at += 1;
- return ch;
+ try {
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ }
+ catch (e) {
+ return '';
},
number = function () {
@@ -389,6 +389,7 @@ except ImportError, e:
}
var self = this;
+ $.cookie('download-' + self.snippet.id(), null, { expires: -1, path: '/' })
self.$downloadForm.find('input[name=\'format\']').val(format);
self.$downloadForm.find('input[name=\'notebook\']').val(ko.mapping.toJSON(self.notebook.getContext()));
self.$downloadForm.find('input[name=\'snippet\']').val(ko.mapping.toJSON(self.snippet.getContext()));