Skip to content

Commit

Permalink
fix(uploader): fixes wrong file size showing and NaN% showing FineUpl…
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbentley committed Oct 17, 2016
1 parent 84e10fc commit 8497204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/js/uploader.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@

this._templating.updateProgress(id, loaded, total);

if (Math.round(loaded / total * 100) === 100) {
if (total === 0 || Math.round(loaded / total * 100) === 100) {
this._templating.hideCancel(id);
this._templating.hidePause(id);
this._templating.hideProgress(id);
Expand Down
4 changes: 4 additions & 0 deletions client/js/uploader.basic.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,10 @@
},

_formatSize: function(bytes) {
if (bytes === 0) {
return bytes + this._options.text.sizeSymbols[0];
}

var i = -1;
do {
bytes = bytes / 1000;
Expand Down

0 comments on commit 8497204

Please sign in to comment.