cleanup file and request references
This commit is contained in:
parent
0fccc86473
commit
7607afd0c9
2 changed files with 5 additions and 3 deletions
|
@ -57,6 +57,7 @@ pandora.chunkupload = function(options) {
|
||||||
response: response,
|
response: response,
|
||||||
responseText: that.responseText
|
responseText: that.responseText
|
||||||
});
|
});
|
||||||
|
options.file = null;
|
||||||
options = null;
|
options = null;
|
||||||
file = null;
|
file = null;
|
||||||
request = null
|
request = null
|
||||||
|
@ -69,7 +70,7 @@ pandora.chunkupload = function(options) {
|
||||||
request = new XMLHttpRequest();
|
request = new XMLHttpRequest();
|
||||||
request.addEventListener('load', function (evt) {
|
request.addEventListener('load', function (evt) {
|
||||||
var response = {};
|
var response = {};
|
||||||
that.responseText = evt.target.responseText;
|
that.responseText = '' + evt.target.responseText;
|
||||||
try {
|
try {
|
||||||
response = JSON.parse(evt.target.responseText);
|
response = JSON.parse(evt.target.responseText);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -99,7 +100,7 @@ pandora.chunkupload = function(options) {
|
||||||
request.addEventListener('error', function (evt) {
|
request.addEventListener('error', function (evt) {
|
||||||
that.status = 'upload failed';
|
that.status = 'upload failed';
|
||||||
that.progress = -1;
|
that.progress = -1;
|
||||||
that.responseText = evt.target.responseText;
|
that.responseText = '' + evt.target.responseText;
|
||||||
done();
|
done();
|
||||||
}, false);
|
}, false);
|
||||||
request.addEventListener('abort', function (evt) {
|
request.addEventListener('abort', function (evt) {
|
||||||
|
@ -149,7 +150,7 @@ pandora.chunkupload = function(options) {
|
||||||
request = new XMLHttpRequest();
|
request = new XMLHttpRequest();
|
||||||
request.addEventListener('load', function (evt) {
|
request.addEventListener('load', function (evt) {
|
||||||
var response;
|
var response;
|
||||||
that.responseText = evt.target.responseText;
|
that.responseText = '' + evt.target.responseText;
|
||||||
try {
|
try {
|
||||||
response = JSON.parse(evt.target.responseText);
|
response = JSON.parse(evt.target.responseText);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
|
@ -2692,6 +2692,7 @@ pandora.uploadQueue = (function() {
|
||||||
queue[index].data.ended = +new Date();
|
queue[index].data.ended = +new Date();
|
||||||
queue[index].data.status = data.progress == 1 ? 'queued' : 'failed';
|
queue[index].data.status = data.progress == 1 ? 'queued' : 'failed';
|
||||||
queue[index].data.progress = data.progress;
|
queue[index].data.progress = data.progress;
|
||||||
|
queue[index].file = null;
|
||||||
upload();
|
upload();
|
||||||
},
|
},
|
||||||
progress: function(data) {
|
progress: function(data) {
|
||||||
|
|
Loading…
Reference in a new issue