From 8267e5e007109e979311784e62502012b1e0d4fd Mon Sep 17 00:00:00 2001 From: Bekcpear Date: Tue, 30 May 2017 22:04:59 +0800 Subject: [PATCH] Fix uploadrate value of 'original-title' attribute The unit of `data.bitrate` is bit, but the argument unit of `humanFileSize` function is byte, so it should be divided by 8. Signed-off-by: Yaojin Qian --- apps/files/js/file-upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 87b6a76d0e..2fa3122a00 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -1027,7 +1027,7 @@ OC.Uploader.prototype = _.extend({ t('files', '{loadedSize} of {totalSize} ({bitrate})' , { loadedSize: humanFileSize(data.loaded), totalSize: humanFileSize(data.total), - bitrate: humanFileSize(data.bitrate) + '/s' + bitrate: humanFileSize(data.bitrate / 8) + '/s' }) ); $('#uploadprogressbar').progressbar('value', progress);