We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7e190e commit af30614Copy full SHA for af30614
js/jquery.fileupload-apc.js
@@ -86,13 +86,15 @@
86
data: { "apc" : true, "apccode" : options.apccode }
87
}).done(function(o) {
88
// Set the apc_data progress.
89
- var r = $.parseJSON(o), e = $.Event('progress', {
90
- lengthComputable: true,
91
- loaded: r.current,
92
- total: r.total
93
- }), now = (new Date()).getTime(), loaded = Math.floor(r.current);
+ var r = $.parseJSON(o), e = false, now = false;
94
if (r) {
95
r = r.apc_data;
+ e = $.Event('progress', {
+ lengthComputable: true,
+ loaded: r.current,
+ total: r.total
96
+ });
97
+ now = (new Date()).getTime(), loaded = Math.floor(r.current);
98
// Add the difference from the previously loaded state
99
// to the global loaded counter:
100
self._progress.total = r.total;
0 commit comments