diff --git a/static/js/chunkupload.js b/static/js/chunkupload.js index c6e192f0a..39031737f 100644 --- a/static/js/chunkupload.js +++ b/static/js/chunkupload.js @@ -57,6 +57,7 @@ pandora.chunkupload = function(options) { response: response, responseText: that.responseText }); + options.file = null; options = null; file = null; request = null @@ -69,7 +70,7 @@ pandora.chunkupload = function(options) { request = new XMLHttpRequest(); request.addEventListener('load', function (evt) { var response = {}; - that.responseText = evt.target.responseText; + that.responseText = '' + evt.target.responseText; try { response = JSON.parse(evt.target.responseText); } catch(e) { @@ -99,7 +100,7 @@ pandora.chunkupload = function(options) { request.addEventListener('error', function (evt) { that.status = 'upload failed'; that.progress = -1; - that.responseText = evt.target.responseText; + that.responseText = '' + evt.target.responseText; done(); }, false); request.addEventListener('abort', function (evt) { @@ -149,7 +150,7 @@ pandora.chunkupload = function(options) { request = new XMLHttpRequest(); request.addEventListener('load', function (evt) { var response; - that.responseText = evt.target.responseText; + that.responseText = '' + evt.target.responseText; try { response = JSON.parse(evt.target.responseText); } catch(e) { diff --git a/static/js/utils.js b/static/js/utils.js index 4a3f6d461..673dee970 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2692,6 +2692,7 @@ pandora.uploadQueue = (function() { queue[index].data.ended = +new Date(); queue[index].data.status = data.progress == 1 ? 'queued' : 'failed'; queue[index].data.progress = data.progress; + queue[index].file = null; upload(); }, progress: function(data) {