diff --git a/client/js/uploader.api.js b/client/js/uploader.api.js index 2603c4354..2e74c4d65 100644 --- a/client/js/uploader.api.js +++ b/client/js/uploader.api.js @@ -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); diff --git a/client/js/uploader.basic.api.js b/client/js/uploader.basic.api.js index 14178c657..03bea64e8 100644 --- a/client/js/uploader.basic.api.js +++ b/client/js/uploader.basic.api.js @@ -795,6 +795,10 @@ }, _formatSize: function(bytes) { + if (bytes === 0) { + return bytes + this._options.text.sizeSymbols[0]; + } + var i = -1; do { bytes = bytes / 1000;