diff --git a/frontend/src/download.js b/frontend/src/download.js index de25bf14..5aa951eb 100644 --- a/frontend/src/download.js +++ b/frontend/src/download.js @@ -30,7 +30,7 @@ $(document).ready(function() { // update progress bar $('#dl-progress').circleProgress('value', percent); $('.percent-number').html(`${Math.floor(percent * 100)}`); - $('.progress-text').text(`${filename} (${bytes(progress[0])} of ${bytes(progress[1])})`); + $('.progress-text').text(`${filename} (${bytes(progress[0], {decimalPlaces: 1, fixedDecimals: true})} of ${bytes(progress[1], {decimalPlaces: 1})})`); //on complete if (percent === 1) { fileReceiver.removeAllListeners('progress'); diff --git a/frontend/src/upload.js b/frontend/src/upload.js index af2b0ee2..3a78a853 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -114,7 +114,7 @@ $(document).ready(function() { $('#ul-progress').circleProgress().on('circle-animation-end', function() { $('.percent-number').html(`${Math.floor(percent * 100)}`); }); - $('.progress-text').text(`${file.name} (${bytes(progress[0])} of ${bytes(progress[1])})`); + $('.progress-text').text(`${file.name} (${bytes(progress[0], {decimalPlaces: 1, fixedDecimals: true})} of ${bytes(progress[1], {decimalPlaces: 1})})`); }); fileSender.on('loading', isStillLoading => {